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

[solved] tabifyDockWidget problem



  • In my mainwindow, I have two dockwidget in tab mode.

    @
    tabifyDockWidget(dw1, dw2);
    @

    Later, I'd like to DIStabify these two widget.

    How can I solve it?



  • I've found a solution, but not to elegant:

    @
    removeDockWidget(dw1);
    removeDockWidget(dw2);
    addDockWidget(Qt::LeftDockWidgetArea, dw1);
    addDockWidget(Qt::RightDockWidgetArea, dw2);
    dw1->show();
    dw2->show();
    @

    First I had to remove the dockwidgets and after I had to newly add them. This will DIStabify the dockwidgets...


Log in to reply