summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/widgets/qmainwindowlayout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp
index 2e773a5790..34ad88913d 100644
--- a/src/widgets/widgets/qmainwindowlayout.cpp
+++ b/src/widgets/widgets/qmainwindowlayout.cpp
@@ -467,6 +467,8 @@ void QDockWidgetGroupWindow::adjustFlags()
}
if (oldFlags != flags) {
+ if (!windowHandle())
+ create(); // The desired geometry is forgotten if we call setWindowFlags before having a window
setWindowFlags(flags);
const bool gainedNativeDecos = (oldFlags & Qt::FramelessWindowHint) && !(flags & Qt::FramelessWindowHint);
const bool lostNativeDecos = !(oldFlags & Qt::FramelessWindowHint) && (flags & Qt::FramelessWindowHint);