When having a dockwidget docked in a main window that has central widget present, saving and restoring geometry to the central widget does not properly work.
Steps to reproduce:
- Run attached sample
- Resize the dock widget few pixels
- Press "Hide" button that saves geometry of the central widget and hides it
- Press "Show" button that shows the central widget and restores geometry to it
- EXPECTED: central widget's geometry is identical to what it was before hiding it
- ACTUAL: central widget's geometry is minimal, with dockwidget hogging up all available space
The issue does not reproduce if the dockwidget is not resized. Also, calling save/restoreState works properly as a workaround.