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

Hide the DockManager does not hide the floating widgets #380

Closed
jporcher opened this issue Dec 2, 2021 · 5 comments
Closed

Hide the DockManager does not hide the floating widgets #380

jporcher opened this issue Dec 2, 2021 · 5 comments

Comments

@jporcher
Copy link

jporcher commented Dec 2, 2021

When you call hide() on the ads::CDockManager while some childs are floating, you would expect them to be hidden as well, but they remain visible.

@githubuser0xFFFF
Copy link
Owner

Sorry, but this is not a bug. It is not intended that hiding the CDockManager hides floating widgets.

@jporcher
Copy link
Author

jporcher commented Dec 2, 2021

@githubuser0xFFFF
I'm surprised because, for the end user, they remain childs of the CDockManager.
If I want to have this behaviour, would you accept it (through a pull request) if it's disabled by default and enabled through a new config flag (eConfigFlag)?

@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented Dec 2, 2021

I don't like the idea to add more complexity for a very special corner case and I also don't like the idea that hiding the dock manager hides the floating widgets. I don't even have an idea why someone would like to hide the dock manager.

So I'm sorry but I'm not convinced and will not accept a pull request.

@jporcher
Copy link
Author

jporcher commented Dec 3, 2021

@githubuser0xFFFF "I don't even have an idea why someone would like to hide the dock manager."

This may be relevant when your application has a welcome widget. Basically, you store the welcome widget and the main widget (a dock manager) in a QStackedLayout. And you then show either the welcome widget when no project/file is opened and the main widget when a project is opened. So then, you would expect the floating widgets to be hidden when moving back to the welcome view after user closed its project/file.

An alternative to using eConfigFlag would be to add a "hideManagerAndFloatingWidgets" function to CDockManager that would simply hide the floating widgets and remember them to be shown back when QShowEvent is executed.

But I won't insist, this is your lib, if you don't want that we will implement it on our side. Just let me know.

@githubuser0xFFFF
Copy link
Owner

You can create a clean pull request. I would prefer the hideManagerAndFloatingWidgets solution. If the changes are small, clean and have no negative performance impact, I may merge it.

jporcher added a commit to jporcher/Qt-Advanced-Docking-System that referenced this issue Dec 9, 2021
@jporcher jporcher mentioned this issue Dec 9, 2021
luelista pushed a commit to luelista/Qt-Advanced-Docking-System that referenced this issue Mar 22, 2022
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

2 participants