diff options
author | Błażej Szczygieł <spaz16@wp.pl> | 2016-01-15 02:29:57 +0100 |
---|---|---|
committer | Błażej Szczygieł <spaz16@wp.pl> | 2016-01-28 17:40:53 +0000 |
commit | 58f8dd4f92e0e647ed530554d7edf3d1a901f552 (patch) | |
tree | 3141e9d6473a2ce4d3d0f13dcf2d462f3d2805f7 /src | |
parent | ee9621b9dc6cab96df627aa7b926e6256ea2102a (diff) |
QtWidgets: Allow to cover up the window container by another widget
When the window container already has a window handle, allow embedded
windows to use this handle as a parent. This change will allow proper
window stacking and clipping.
Task-number: QTBUG-50477
Change-Id: I8d656ecb99e0c42ae7a7ac461e5e5b5d801f5493
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qwindowcontainer.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwindowcontainer.cpp b/src/widgets/kernel/qwindowcontainer.cpp index 3885431b05..e8c4a763ee 100644 --- a/src/widgets/kernel/qwindowcontainer.cpp +++ b/src/widgets/kernel/qwindowcontainer.cpp @@ -84,6 +84,11 @@ public: if (usesNativeWidgets || window->parent() == 0) return; Q_Q(QWindowContainer); + if (q->internalWinId()) { + // Allow use native widgets if the window container is already a native widget + usesNativeWidgets = true; + return; + } QWidget *p = q->parentWidget(); while (p) { if ( @@ -147,8 +152,10 @@ public: as a child of a QAbstractScrollArea or QMdiArea, it will create a \l {Native Widgets vs Alien Widgets} {native window} for every widget in its parent chain to allow for proper stacking and - clipping in this use case. Applications with many native child - windows may suffer from performance issues. + clipping in this use case. Creating a native window for the window + container also allows for proper stacking and clipping. This must + be done before showing the window container. Applications with + many native child windows may suffer from performance issues. The window container has a number of known limitations: |