Closed bbc131 closed 4 months ago
You might be right, but I would like to reproduce this as well, to maybe write a test.
Can't repro on Win11 / Qt 6.6.2, stock qtwidgets_dockwidgets
without flags.
Which versions are you on ?
Sure, my code above should just be a hint where / what the problems are...
I use Win 10 and Qt 5.15.8
Can reproduce it with the default example qtwidgets_dockwidgets
without any flags.
Thanks, reproduced with Qt 5
Works for me now, thanks for the investigation
I think there is a regression. The case, where you first maximize the window, save this (maximized) layout and try to restore this later, doesn't work anymore. This worked before.
I've added tests for that case as well now, and fixed it.
Windows and KDE pass the test. Ubuntu and macOS pass a manual test, but not the automatic one, need to investigate further.
Tests are passing on mac and ubuntu now
The problem can be reproduced with the example
qtwidgets_dockwidgets
:Now, on Windows, the mainwindow looks like correctly restored but isn't. For example, you cannot change its size by click'n'drag on its edges, you first need to move it a bit by click'n'drag at the windows title bar. (On Ubuntu, the restoring also doesn't work, but behaves differently. The window just stays maximized.)
To fix this, I think there are two things in
LayoutSaver::restoreLayout(..)
, that need to be changed.WindowState::None
.deserializeWindowGeometry
cannot set the geometry correctly, if the window is currently maximized, so the window-state should be changed beforehand.I checked this by playing a bit and this hack seems to solve the problem: