I have resorted to setting up page_output programmatically. The QVBoxLayout (verticalLayout_3) is still added to the widget in Design mode, but this is the code to add mdiArea and box_outputLog (now both declared in mainwindow.h):
mdiArea = new QMdiArea;
verticalLayout_3->addWidget(mdiArea);
verticalLayout_3->addWidget(box_outputLog);
mdiArea = new QMdiArea;
verticalLayout_3->addWidget(mdiArea);
box_outputLog = new QTextBrowser;
verticalLayout_3->addWidget(box_outputLog);
To copy to clipboard, switch view to plain text mode
This almost works. The 20 QwtPlot objects are now constrained to an area with a scrollbar - excellent! - but although the text window has a reasonable size (I don't know what is determining the sizes, since I don't specify any), but no scrollbar, so the output text quickly disappears off the bottom of the window. (see the attached Capture-program.jpg). If I try to set the size of box_outputLog:
box_outputLog->setMinimumHeight(200);
box_outputLog->setMaximumHeight(200);
box_outputLog->setMinimumHeight(200);
box_outputLog->setMaximumHeight(200);
To copy to clipboard, switch view to plain text mode
the result is back to the original problem - only mdiArea is visible, extending off the screen, with no scrollbar. I haven't found a way to set the size of the vertical layout. This is very frustrating.
Edit: I have tried the QSplitter idea:
splitter->setOrientation(Qt::Vertical);
mdiArea = new QMdiArea;
splitter->addWidget(mdiArea);
splitter->addWidget(box_outputLog);
verticalLayout_3->addWidget(splitter);
QSplitter *splitter = new QSplitter;
splitter->setOrientation(Qt::Vertical);
mdiArea = new QMdiArea;
box_outputLog = new QTextBrowser;
splitter->addWidget(mdiArea);
splitter->addWidget(box_outputLog);
verticalLayout_3->addWidget(splitter);
To copy to clipboard, switch view to plain text mode
Maybe I've done it wrong, but anyway it doesn't change anything - I still see only the graphs, with no scrollbar.
Bookmarks