diff options
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 44ac380..3a7fc4b 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -317,9 +317,14 @@ void QSymbianControl::ConstructL(bool topLevel, bool desktop) { if (!desktop) { - if (topLevel) + // We cannot assume that parentless widgets are top-level + QWidget *const parent = qobject_cast<QWidget *>(qwidget->parent()); + + if (topLevel or parent) CreateWindowL(S60->windowGroup()); - + else + CreateWindowL(parent->winId()); + SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); } |