KDDockWidgets icon indicating copy to clipboard operation
KDDockWidgets copied to clipboard

How can I hide, then reshow tab group all at once so that tabs can be brought back together instead of seperating?

Open acarlson98 opened this issue 1 year ago • 3 comments

Is there a correct way to hide or show a group of widgets at the same time via QML? Simply calling .close() and .show() on all the widgets in order works in most cases (if all widgets are docked, if widgets are undocked but not tabbed), but does not work when any of the targeted widgets are tabbed together and undocked. In this case, the functions cause the widgets to redock, but leaves the widget in the last tab index undocked.

Please see gif below. I would expect the tabbed, undocked widgets in this case to remain that way when opened again, but dock4 and dock5 are redocked in the main docking area and dock6 remains undocked:

hide and show undocked tab group issue 2

I slightly modified the qtquick_dockwidgets example to make this gif. This is KDDockWidgets v2.1.0 and built using Visual Studio 2019.

The function that is fired to show or hide the widget group:

function toggleWidgetGroup() {
    if(root.groupShown){
        dock4.close()
        dock5.close()
        dock6.close()
    } else {
        dock4.open()
        dock5.open()
        dock6.open()
    }
    root.groupShown = !root.groupShown
}

acarlson98 avatar Jul 01 '24 19:07 acarlson98

This will be a bit more involved than I thought.

DockWidgets don't save their placeholder in floating windows, only main windows. Checking what can be done

iamsergio avatar Jul 05 '24 11:07 iamsergio

This depends on issue #280 which has been fixed in main / 2.2

iamsergio avatar Jul 15 '24 00:07 iamsergio

Hello Sergio,

Is there an update for this issue?

Thanks.

MikeRavenelle avatar Aug 05 '24 19:08 MikeRavenelle