From 1a551b57e5c9738ba81200dae6aa33ac8b6d2b96 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Thu, 27 Aug 2009 13:45:45 +0100 Subject: Made non-toplevel widgets window-owning --- src/gui/kernel/qapplication_s60.cpp | 9 +++++++-- 1 file 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->parent()); + + if (topLevel or parent) CreateWindowL(S60->windowGroup()); - + else + CreateWindowL(parent->winId()); + SetFocusing(true); m_longTapDetector = QLongTapTimer::NewL(this); } -- cgit v0.12