diff options
Diffstat (limited to 'src/gui/kernel/qwidget_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index e11f1fc..b3599bd 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -109,9 +109,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO q_createNativeChildrenAndSetParent(q->platformWindow(),q); //if we we have a parent, then set correct parent; - if (QWidget *nativeParent = q->nativeParentWidget()) { - if (nativeParent->platformWindow()) { - platformWindow->setParent(nativeParent->platformWindow()); + if (!q->isWindow()) { + if (QWidget *nativeParent = q->nativeParentWidget()) { + if (nativeParent->platformWindow()) { + platformWindow->setParent(nativeParent->platformWindow()); + } } } |