Continuing to port my Qt application from Qt4 to Qt5, I have encountered a difference in the way a QMdiArea widget is handled.
The .ui file that is created interactively in Qt Creator includes a QStackedWidget, one member of which is a QWidget in which I have placed a QMdiArea (mdiArea) and a QTextBrowser (box_outputLog). These two windows are sized such that box_outputLog has a constant size, while the rest of the available space is occupied by mdiArea. To achieve this, each has Horizontal Policy and Vertical Policy set to Expanding, while the vertical sizes are as follows:
mdiArea: MinimumSize Vertical = 500, MaximumSize Vertical = 16777215
box_outputLog: MinimumSize Vertical = 200, MaximumSize Vertical = 200
In other words the QTextBrowser window is always 200 high, and the rest of the available space is used by the QMdiArea window.
mdiArea is populated programmatically with 20 QwtPlot objects, like this:
mdiArea->addSubWindow(pGraph[i]);
mdiArea->addSubWindow(pGraph[i]);
To copy to clipboard, switch view to plain text mode
then the area is tiled:
mdiArea->tileSubWindows();
mdiArea->tileSubWindows();
To copy to clipboard, switch view to plain text mode
giving 4 rows of 5 plots. In the Qt4 version, since the plots do not all fit in the available space, a scrolling slider is displayed. (box_outputLog also gets a slider when the text sent to it exceeds the space.) This all works fine with Qt4, but in the Qt5 version the 20 plots are not constrained to the allocated space, instead they extend off the screen. There is no scrolling slider, so the last row cannot be seen, and there is no box_outputLog window.
Screenshots of the two cases are attached.
I wonder if somebody can tell me what I need to do to make the Qt5 version behave like the Qt4 program.
Thanks
Gib
Bookmarks