Created
September 9, 2021 12:40
-
-
Save torarnv/003153193a486f01d8fda23b046e89ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git c/examples/widgets/windowcontainer/windowcontainer.cpp i/examples/widgets/windowcontainer/windowcontainer.cpp | |
index a104949d1eb..6bfc0e33bd2 100644 | |
--- c/examples/widgets/windowcontainer/windowcontainer.cpp | |
+++ i/examples/widgets/windowcontainer/windowcontainer.cpp | |
@@ -162,6 +162,7 @@ int main(int argc, char *argv[]) | |
QHBoxLayout *layout = new QHBoxLayout(widget); | |
Window *window = new Window; | |
+ window->setFlag(Qt::SubWindow); | |
QWidget *container = QWidget::createWindowContainer(window); | |
container->setMinimumSize(300, 300); | |
diff --git c/src/gui/kernel/qplatformintegration.cpp i/src/gui/kernel/qplatformintegration.cpp | |
index a53f0d09d71..1427db5c614 100644 | |
--- c/src/gui/kernel/qplatformintegration.cpp | |
+++ i/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()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment