Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acarlson98 opened this issue Jul 1, 2024 · 3 comments
Assignees

Comments

@acarlson98
Copy link

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 acarlson98 changed the title How to hide tab groups all at once so that they can be brought back together How can I hide, then reshow tab group all at once so that tabs can be brought back together instead of seperating? Jul 1, 2024
@iamsergio iamsergio self-assigned this Jul 4, 2024
iamsergio added a commit that referenced this issue Jul 5, 2024
Convenience to close all groups at once.
Part of issue #513
iamsergio added a commit that referenced this issue Jul 5, 2024
Can't name it close as it clashes with View::close().
Part of issue #513
@iamsergio
Copy link
Contributor

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 added a commit that referenced this issue Jul 10, 2024
They currently lose if there's a competing main window placeholder.
Test is currently failing.

For issue #513 and #280
iamsergio added a commit that referenced this issue Jul 14, 2024
They currently lose if there's a competing main window placeholder.
Test is currently failing.

For issue #513 and #280
@iamsergio
Copy link
Contributor

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

iamsergio added a commit that referenced this issue Jul 20, 2024
FloatingWindow's are deleted all the time but their layouts
are interesting to restore dockwidgets to floating position

For issue #513
iamsergio added a commit that referenced this issue Jul 20, 2024
The idea works in theory, code is done, now just debugging is needed
as it's crashing currently.

For issue #513
iamsergio added a commit that referenced this issue Jul 28, 2024
The idea works in theory, code is done, now just debugging is needed
as there's some weird results still

For issue #513
iamsergio added a commit that referenced this issue Jul 28, 2024
@MikeRavenelle
Copy link

Hello Sergio,

Is there an update for this issue?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants