Results 1 to 19 of 19

Thread: QMdiArea behaviour different between Qt4 and Qt5

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    121
    Thanks
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QMdiArea behaviour different between Qt4 and Qt5

    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:

    Qt Code:
    1. mdiArea->addSubWindow(pGraph[i]);
    To copy to clipboard, switch view to plain text mode 

    then the area is tiled:

    Qt Code:
    1. 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
    Attached Images Attached Images

Similar Threads

  1. QMdiArea
    By Programm3r in forum Qt Programming
    Replies: 0
    Last Post: 4th May 2009, 14:25
  2. Weird behaviour with QMdiSubWindows in a QMdiArea?
    By qt_noob in forum Qt Programming
    Replies: 2
    Last Post: 4th April 2009, 16:48
  3. QMdiArea and styleSheet
    By Raccoon29 in forum Qt Programming
    Replies: 4
    Last Post: 3rd December 2008, 17:25
  4. QMdiArea with designer
    By maximAL in forum Qt Tools
    Replies: 3
    Last Post: 7th September 2007, 12:58
  5. QMdiArea problem
    By walito in forum Newbie
    Replies: 3
    Last Post: 30th July 2007, 08:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.