summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-18 11:48:39 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-18 11:48:39 +0200
commit411525a29e1d98c5e2a7052307bcd9e386710f26 (patch)
treef02949260fffd32dc1e01f5cfcf06c0063bc03c7 /src/gui/kernel/qwidget_qpa.cpp
parent144f1f710ad46e89a7c07e94f80ac3744ace5c3f (diff)
Lighthouse:Only native children uses setParent
Diffstat (limited to 'src/gui/kernel/qwidget_qpa.cpp')
-rw-r--r--src/gui/kernel/qwidget_qpa.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp
index e11f1fcb88..b3599bd05e 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());
+ }
}
}