Fix dock widget size/position not being restored on Qt6

This commit is contained in:
Kellermorph
2026-08-22 11:08:02 +02:00
parent f951c20586
commit f6afd87522
4 changed files with 40 additions and 6 deletions
+9 -1
View File
@@ -648,7 +648,15 @@ void QETTitleBlockTemplateEditor::readSettings()
// window state (toolbars, docks...)
QVariant state = settings.value("titleblocktemplateeditor/state");
if (state.isValid()) restoreState(state.toByteArray());
if (state.isValid()) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (!restoreState(state.toByteArray())) {
settings.remove("titleblocktemplateeditor/state");
}
#else
restoreState(state.toByteArray());
#endif
}
}
/**