Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0, 6.8.1
-
None
-
GNU/Linux
Description
If you remove a dockwidget by calling QMainWindow::removeDockWidget(), saving and then restoring it again will make the removed dock widget reappear again. Please take a look at the attached example.
To reproduce:
1. File->"Remove dock X"
2. File->"Save State"
3. File->"Restore State"
Additional description:
Dock widgets that have been removed from the main window by calling removeDockWidget() (or those that have never been added, likewise) must not be docked implicitly by calling restoreState(), or strange effects will occur if one of these widgets currently is in an invalid state. The only way I found circumventing this is destroying those widgets before calling restoreState() and recreating them afterwards, which also is not what I want to do, because then their layout is not restored at all. restoreState() should just do what the name of the method implies: Restore the state of the dock widgets, i.e. dock area, tabbed status etc., but it must not add them to the QMainWindow automatically.