diff options
author | Morten Sørvig <[email protected]> | 2025-06-24 19:25:58 +0200 |
---|---|---|
committer | Morten Sørvig <[email protected]> | 2025-06-25 19:55:50 +0200 |
commit | f40cd77c535b8f86fda1835ccd9ca686fbb9879b (patch) | |
tree | 6e184d57b6da3f0daaf33dcaa90734f3794af821 | |
parent | 91ef07052720b01478e82860798feac5fc76ebd2 (diff) |
Make the windowflags example use "normal" windows
This example uses two windows and requires both to be visible
at the same time. Call showNormal() instead of show() to prevent
the first window from becoming fullscreen on platforms where show()
uses fullscreen mode by default.
Change-Id: Iab8bcfeba0ec14a8ea87256e0c843db279749d61
Reviewed-by: Tor Arne Vestbø <[email protected]>
-rw-r--r-- | examples/widgets/widgets/windowflags/controllerwindow.cpp | 2 | ||||
-rw-r--r-- | examples/widgets/widgets/windowflags/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/widgets/windowflags/controllerwindow.cpp b/examples/widgets/widgets/windowflags/controllerwindow.cpp index 80d5f9e59b4..dc1145262b3 100644 --- a/examples/widgets/widgets/windowflags/controllerwindow.cpp +++ b/examples/widgets/widgets/windowflags/controllerwindow.cpp @@ -100,7 +100,7 @@ void ControllerWindow::updatePreview() if (pos.y() < 0) pos.setY(0); previewWindow->move(pos); - previewWindow->show(); + previewWindow->showNormal(); } //! [4] diff --git a/examples/widgets/widgets/windowflags/main.cpp b/examples/widgets/widgets/windowflags/main.cpp index b01716ddae1..93b5c2d5217 100644 --- a/examples/widgets/widgets/windowflags/main.cpp +++ b/examples/widgets/widgets/windowflags/main.cpp @@ -9,6 +9,6 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); ControllerWindow controller; - controller.show(); + controller.showNormal(); return app.exec(); } |