Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Maximizing SubWindow in MdiArea



  • Hey Mates,

    I am new to the Qt-community. I am working on a GUI Application and I want it have a MDInterface. My Problem is, when I addSubWindow() everything works. When I Maximize it the Titlebar of the Subwindow goes to the MenuBar. I want the SubWindow to stay into the MDIArea. What am I doing wrong ?

    First I set an MdiArea
    @
    mdiArea = new QMdiArea();
    setCentralWidget(mdiArea);@

    Afterwards I add a SubWindow

    @MainChild *MainWindow::createMdiChild()
    {
    MainChild *child = new MainChild;
    mdiArea->addSubWindow(child);
    child->showMaximized();
    return child;
    }@

    Everything works great till here.

    When the subWindow is maximized it looks like:

    !http://i54.tinypic.com/t4zpyt.png()!

    But I want it to stay maximized in the MDIArea... like that

    !http://i56.tinypic.com/jhufqc.png()!

    What do I have to change in the code... any suggestions?

    greetz



  • I think this will not work without schnaging QMdiArea, as it is the normal behavior of an MDI sub window.


Log in to reply