When restoring state Qt will restore dock widgets, some of them can be in a QDockWidgetGroupWindow.
Qt however won't create the actual dock widgets, it's expected that the user opens them before calling restoreState(). If the user calls restoreState() before opening the dock widgets an empty QDockWidgetGroupWindow is created, which has no tabs and can't be closed.
- Open qtbase/examples/widgets/mainwindows/mainwindow
- Main window -> Enable groupped dragging (in the menu)
- Dock Widgets -> Add Dock Widget (call it foo)
- Dock Widgets -> Add Dock Widget (call it bar)
- Make foo and bar float, drop bar on top of foo, you now have a window with two tabs
- File -> Save Layout
- Close app
- Start app again, and File -> Load Layout
You now see a window which you can't close