Important: Please read the Qt Code of Conduct -

[Solved] Window attributes and geometry for QMdiSubWindow

  • It' s a little difficult to understand the exact interaction between the QMdiSubWindow and it's embedded child window.
    The general rule for an MDI UI is to first create a "regular" window (QWidget) and then add it to the MDI area using QMdiArea::addSubWindow and obtain a QMdiSubWindow. But now I have two handles to the window.
    What's still very unclear is what window now should/must to be used when changing some of the window attributes like visibility, enabled or the size and position.
    Especially setting an absolute position or a fixed size does not really seem to work as expected.

  • Have a look at "this": example, there is an MDI app created.

    The Child of the QMdiArea is the QMdiSubWindow which itself contains your widget. So for geometry handling, hiding etc, you should use the MdiSubWindow

Log in to reply