Well I'm not sure I did something wrong o.O
Revizing the order:
* Go to the form: place the QWidget and the items forming the menu. Click in the QTabWidget and in "Lay out in a Grid" in the upper menu of Qt Creator's "Designer". (So now changes in the size of the widget would cause changes in the size of my QWidget)
* Go to the code:
** Reimplement Mainwindow's resizeEvent() function. There, do a QwtPlot->resize(QWidget->size()); (So now each time the mainwindow's size is changed, it will change the size of the QTabWidget which will change the size of the QWidget an than by this resizeEvent() the size of the QwtPlot will change as well).
** In class MainWindow's constructor method: First force the QWidget to the size it sould have (which is the size it appears in the form when compiling but don't appear naturally when the software is opened: here the probable bug). Then declare/instantiate QwtPlot *graphPlot = new QwtPlot(ui->QWidget). Than do a graphPlot->resize(graphPlot->parentWindow->size());
So where is the error?
Bookmarks