aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/windowembedding/examples/stacking.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/windowembedding/examples/stacking.qml')
-rw-r--r--tests/manual/windowembedding/examples/stacking.qml50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/manual/windowembedding/examples/stacking.qml b/tests/manual/windowembedding/examples/stacking.qml
new file mode 100644
index 0000000000..7634bb0bff
--- /dev/null
+++ b/tests/manual/windowembedding/examples/stacking.qml
@@ -0,0 +1,50 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Rectangle {
+ id: rootItem
+ gradient: Gradient.TemptingAzure
+ width: 500; height: 500
+
+ property int windowZ: 0
+
+ Window {
+ id: redWindow
+ color: "red"
+ visible: true
+ parent: rootItem
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: redWindow.z = ++rootItem.windowZ
+ }
+ }
+
+ Window {
+ id: greenWindow
+ color: "green"
+ visible: true
+ parent: rootItem
+ x: 100; y: 100
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: greenWindow.z = ++rootItem.windowZ
+ }
+ }
+
+ Window {
+ id: blueWindow
+ color: "blue"
+ visible: true
+ parent: rootItem
+ x: 200; y: 200
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: blueWindow.z = ++rootItem.windowZ
+ }
+ }
+}