diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-18 09:48:39 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-18 09:48:39 (GMT) |
commit | 411525a29e1d98c5e2a7052307bcd9e386710f26 (patch) | |
tree | f02949260fffd32dc1e01f5cfcf06c0063bc03c7 /src/gui/kernel | |
parent | 144f1f710ad46e89a7c07e94f80ac3744ace5c3f (diff) | |
download | Qt-411525a29e1d98c5e2a7052307bcd9e386710f26.zip Qt-411525a29e1d98c5e2a7052307bcd9e386710f26.tar.gz Qt-411525a29e1d98c5e2a7052307bcd9e386710f26.tar.bz2 |
Lighthouse:Only native children uses setParent
Diffstat (limited to 'src/gui/kernel')
-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()); + } } } |