How to apply WindowFlags to MdiSubWindow correctly?



  • Hello to everebody!
    I have faced the problem while passing the SubWindow to the MdiArea's addSubWindowMethod. In this case the flags are not working correctly. If to specify the Qt::WindowMinimizeButtonHint flag then also close button and window icon are shown. Can anybody explain why does it happen? Thanks!

    Declaration of the SubWindow class:

    @
    SubWindow::SubWindow(QWidget* parent): QMdiSubWindow(parent)
    {

    setShown(true);
    

    }
    @

    The usage of the SubWindow class:

    @
    Qt::WindowFlags flags = Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint;
    log_subWindow = new SubWindow(this);
    log_subWindow->setWidget(logWindow);

    mdiArea->addSubWindow(log_subWindow, flags);
    @

    [EDIT: code formatting, please wrap in @-tags, Volker]


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.