External WM_DESTROY received... PROBLEM



  • Hi, I have a problem with some QDockWidget...

    Long story short, I have a QDockWidget with multiple QDockWidget "inside" of it. If I undock the "main" QDockWidget and then, undock more than one QDockWidget that were "inside" of it, when I dock back the main QDockWidget, only the first undocked secondary QDockWidget keep is position. All the others secondary widgets get destroy with this message :

    External WM_DESTROY received for QWidgetWindow(0x1b77143f790, name="dw_savingOptionsWindow") , parent: QWindow(0x0) , transient parent: QWidgetWindow(0x1b771440190, name="dw_settingsWindow")

    I guess this is because the parent isn't set... But I don't even know what is a QWidgetWindow...

    **dw_settings is the main QDockWidget
    **dw_savingOptions is one of the secondary QDockWidget

    Did someone had this problem and find any solution...
    I could just send a signal to dock back all the secondary QDockWidget when the main QDockWidget is docked but that's an ugly fix.

    Thanks for any help!
    Olivier

    Here is the part of the code where I set the QDockWidget :

        mMainWindowSetting = new QMainWindow(this);
        mMainWindowSetting->setDockOptions(QMainWindow::AnimatedDocks);
        mMainWindowSetting->addDockWidget(Qt::TopDockWidgetArea,ui->dw_acqOptions);
        mMainWindowSetting->splitDockWidget(ui->dw_acqOptions,ui->dw_savingOptions,Qt::Vertical);
        mMainWindowSetting->addDockWidget(Qt::BottomDockWidgetArea,ui->dw_graphics);
        mMainWindowSetting->splitDockWidget(ui->dw_graphics,ui->dw_note,Qt::Vertical);
    
        ui->sa_settings->setWidget(mMainWindowSetting);
    

    sa_setting is a QScrollArea inside the main QDockWidget (dw_setting)

    *** EDIT
    I'm using Desktop Qt 5.7 MSVC2015_64bit on Windows 10.


Log in to reply
 

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