-
Notifications
You must be signed in to change notification settings - Fork 551
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
Floating dock widget container is not destroyed instantly when view is redocked #351
Comments
Yes, you are right, the floating widget is deleted with deleteLater() call. Please try to implement your proposal and hide the floating widget immediately. |
@githubuser0xFFFF I tried to hide the floating widget at the line 1569 of "DockContainerWidget.cpp" but it also hid the docking widget (probably because the contained widget still has the floating widget as parent when I hide it). |
You should try to avoid blocking the event loop. Your doSomething() implementation is not a good solution. Maybe you can do the things in a different thread. |
The doSomething() method is juste a simple way to reproduce the bug. We are currently using a thread on our programm. Until now, we never had a problem with this kind of implementation. |
I have summarized the problem in the code below.
MainWindow.h
MainWindow.cpp
MainWindow.ui
To reproduce the issue:
"do something” enters a loop but it processes QApplication events (call to processEvents), so that GUI remains responsive.
After a closer look, it seems that the problem comes from the fact that the floating container is not destroyed manually when the widget is docked.
When the widget is redocked, looks like the floating container is requested to be deleted and this is done later by Qt.
Probably the floating container should be manually destroyed or at least hidden so that it disappears from screen waiting to be cleanly deleted by Qt ?
Thank you in advance
The text was updated successfully, but these errors were encountered: