Allow saving state on Qt 6

It seems to work normally in Qt 6.5 (which has no tab support).

Previous issue: #1538.
This commit is contained in:
Damien Elmes 2023-09-20 14:16:12 +10:00
parent 34f329b306
commit 3ed7c75468

View file

@ -713,9 +713,8 @@ def _qt_state_key(kind: _QtStateKeyKind, key: str) -> str:
def saveGeom(widget: QWidget, key: str) -> None:
# restoring a fullscreen window is buggy
# (at the time of writing; Qt 6.2.2 and 5.15)
if not widget.isFullScreen():
# restoring a fullscreen window breaks the tab functionality of 5.15
if not widget.isFullScreen() or qtmajor == 6:
key = _qt_state_key(_QtStateKeyKind.GEOMETRY, key)
aqt.mw.pm.profile[key] = widget.saveGeometry()