diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-09 17:42:26 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-10 13:07:27 +0000 |
commit | c066cd260087199ed309600d1b924af270cc3a14 (patch) | |
tree | 58fc7643fb3aac18ebb40f4b92d6f8e7b545ffa5 /src/gui | |
parent | dca394096fff0f7b48768e047f2b180abf000d12 (diff) |
Always give Qt::SubWindows a default window state of Qt::WindowNoState
On platforms such as iOS, the default window state is Qt::WindowMaximized,
so that calling show() will fill the entire screen. But sub-windows should
not get this treatment, as their geometry is typically managed manually.
Pick-to: 6.2 6.2.0
Change-Id: Ib17c2011a16baf6023fe368b94fa7f38e12bd777
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index a53f0d09d7..1427db5c61 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -450,6 +450,9 @@ Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags) if (flags & Qt::Popup & ~Qt::Window) return Qt::WindowNoState; + if (flags & Qt::SubWindow) + return Qt::WindowNoState; + if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool()) return Qt::WindowFullScreen; else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) |