diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-27 12:45:45 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-28 12:30:29 (GMT) |
commit | 1a551b57e5c9738ba81200dae6aa33ac8b6d2b96 (patch) | |
tree | 934239564cf595a916f674dc461dbb1b70184dd4 /src/gui/kernel | |
parent | 559ef5cafeb39766a7481a37168e37e9cb315bb5 (diff) | |
download | Qt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.zip Qt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.tar.gz Qt-1a551b57e5c9738ba81200dae6aa33ac8b6d2b96.tar.bz2 |
Made non-toplevel widgets window-owning
Diffstat (limited to 'src/gui/kernel')
-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); } |