aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/windowembedding/examples/transform.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/windowembedding/examples/transform.qml')
-rw-r--r--tests/manual/windowembedding/examples/transform.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/manual/windowembedding/examples/transform.qml b/tests/manual/windowembedding/examples/transform.qml
new file mode 100644
index 0000000000..c07dae5850
--- /dev/null
+++ b/tests/manual/windowembedding/examples/transform.qml
@@ -0,0 +1,42 @@
+// 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
+
+ Rectangle {
+ id: rectangle
+ width: 200; height: 200
+ color: "lightgray"
+
+ transformOrigin: Item.TopLeft
+ transform: [
+ Translate { id: translation; x: 50; y: 50 }
+ ]
+ //scale: 3 // FIXME: Doesn't work when assigned like this
+
+ Window {
+ id: childWindow
+ objectName: "childWindow"
+ visible: true
+ parent: rectangle
+ width: 200; height: 200
+
+ Image {
+ source: "https://placedog.net/500/500?random"
+ anchors.fill: parent
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ rectangle.scale += 0.1
+ }
+ }
+ }
+ }
+}