My app has a QMainWindow with a QDockWidget child.

If I float the dock and minimize the main window, the dock minimizes with the window, as expected.

However, if I call QMainWindow::saveState, exit the app, restart and call QMainWindow::restoreState(), the floating dock is restored, but no longer mimimizes along with the QMainWindow.

If I temporarily drag the dock back into the main window and then re-float it, it reverts back to the original behavior of minimizing/restoring along with the main window.

Does anyone have an explanation for this behavior? Is this a bug in QT, or am I missing something...



PS - I'm using Qt 4.8.3