summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 0f5873543b..f1e08826a8 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2587,6 +2587,8 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed()
return;
Q_Q(QWindow);
+ if (!q->isTopLevel())
+ return;
// Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent
bool quitOnClose = QGuiApplication::quitOnLastWindowClosed() && !q->parent();
QWindowList list = QGuiApplication::topLevelWindows();
@@ -2643,7 +2645,7 @@ QOpenGLContext *QWindowPrivate::shareContext() const
native window, or to embed a native window inside a QWindow.
If foreign windows are not supported or embedding the native window
- failed in the platform plugin, this function returns 0.
+ failed in the platform plugin, this function returns \nullptr.
\note The resulting QWindow should not be used to manipulate the underlying
native window (besides re-parenting), or to observe state changes of the