Hello world,
i use QtCreator and Qwt, i try to plot in real time 6 curve but i not a master in programmation and it's very difficult for me...
can you help me to:
1°) place my curve correctly
2°) with the good size
i do a project to place 6curve and 4button on a windows, the result is nice (http://imageshack.us/photo/my-images/851/myplots.jpg/) but i want to increase the size of my plot and have a good arrangement
==> the plots have to take the total windows (except button emplacement)
How i have to modify this programm to have bigger plots with a good arrangement ?
main.cpp
MyMainWindow.hCode:
#include <QApplication> #include "MyMainWindow.h" #include <QGridLayout> int main(int argc, char *argv[]) { MyMainWindow fenetre; fenetre.setWindowFlags(Qt::Window); MyGridLayout->addWidget(fenetre.get_WindowNumber1(),0,0,3,3); MyGridLayout->addWidget(fenetre.get_WindowNumber2(),0,3,3,3); MyGridLayout->addWidget(fenetre.get_WindowNumber3(),0,6,3,3); MyGridLayout->addWidget(fenetre.get_WindowNumber4(),3,0,3,3); MyGridLayout->addWidget(fenetre.get_WindowNumber5(),3,3,3,3); MyGridLayout->addWidget(fenetre.get_WindowNumber6(),3,6,3,3); MyGridLayout->addWidget(fenetre.get_BUTTONRun(),0,8); MyGridLayout->addWidget(fenetre.get_BUTTONQuit(),0,9); MyGridLayout->addWidget(fenetre.get_BUTTONAbout(),1,8); MyGridLayout->addWidget(fenetre.get_BUTTONContact(),1,9); fenetre.setLayout(MyGridLayout); fenetre.show(); return app.exec(); }
MyMainWindow.cppCode:
#ifndef MYMAINWINDOW_H #define MYMAINWINDOW_H #include <QApplication> #include <QWidget> #include <QPushButton> #include <QMessageBox> #include <qwt_plot.h> { Q_OBJECT public: MyMainWindow(); ~MyMainWindow(); private: QPushButton *BUTTONRun; QPushButton *BUTTONQuit; QPushButton *BUTTONAbout; QPushButton *BUTTONContact; QWidget *WindowNumber1; QWidget *WindowNumber2; QWidget *WindowNumber3; QWidget *WindowNumber4; QWidget *WindowNumber5; QWidget *WindowNumber6; QwtPlot *myPlot1; QwtPlot *myPlot2; QwtPlot *myPlot3; QwtPlot *myPlot4; QwtPlot *myPlot5; QwtPlot *myPlot6; }; #endif // MYMAINWINDOW_H
Code:
#include "MyMainWindow.h" { } MyMainWindow::~MyMainWindow() { } { return BUTTONRun; } { return BUTTONQuit; } { return BUTTONAbout; } { return BUTTONContact; } { return WindowNumber1; } { return WindowNumber2; } { return WindowNumber3; } { return WindowNumber4; } { return WindowNumber5; } { return WindowNumber6; }