aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Drawer.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-30 17:21:55 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-30 22:13:11 +0000
commit7fc567eda8a187e365f4c29c6e8f08440bf31218 (patch)
tree9aabcb48b936d94f52369f8f110fe7cd916f2af1 /src/imports/controls/material/Drawer.qml
parentcb86fefb321a05eb50b905a696401542acf7d441 (diff)
Make popups work without ApplicationWindow, to some degreev5.6.0-rc1v5.6.0
Using ApplicationWindow is highly recommended. First of all, with a plain Window, QQuickPopup attempts to set a high z-value, but cannot guarantee correct stacking order. Secondly, we cannot provide style- specific background dimming for modal popups, because it is styled as part of ApplicationWindow. Last but not least, QQuickPopup has to install a window-level event filter, which is far less efficient than how event handling done in QQuickOverlay. Change-Id: I08915abce7a1764177b92f7539eef77c054a405a Task-number: QTBUG-49921 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/material/Drawer.qml')
-rw-r--r--src/imports/controls/material/Drawer.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/controls/material/Drawer.qml b/src/imports/controls/material/Drawer.qml
index cb00096d..133ea9c8 100644
--- a/src/imports/controls/material/Drawer.qml
+++ b/src/imports/controls/material/Drawer.qml
@@ -35,13 +35,14 @@
****************************************************************************/
import QtQuick 2.6
+import QtQuick.Window 2.2
import Qt.labs.templates 1.0 as T
import Qt.labs.controls.material 1.0
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay
+ parent: T.ApplicationWindow.overlay || Window.contentItem
width: parent ? parent.width : 0 // TODO: Window.width
height: parent ? parent.height : 0 // TODO: Window.height