aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2/data/viewports.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/viewports.qml')
-rw-r--r--tests/auto/quick/qquickitem2/data/viewports.qml54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/viewports.qml b/tests/auto/quick/qquickitem2/data/viewports.qml
new file mode 100644
index 0000000000..18258676b4
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/viewports.qml
@@ -0,0 +1,54 @@
+import QtQuick
+import Test 1.0
+
+Item {
+ width: 300
+ height: 300
+
+ Rectangle {
+ objectName: "outerViewport"
+
+ x: 40
+ y: 40
+ width: 220
+ height: 220
+ border.color: "green"
+ color: "transparent"
+
+ Rectangle {
+ objectName: "innerViewport"
+ width: parent.width
+ height: parent.height
+ x: 20
+ y: 20
+ border.color: "cyan"
+ color: "transparent"
+
+ Rectangle {
+ objectName: "innerRect"
+ color: "wheat"
+ opacity: 0.5
+ x: -55
+ y: -55
+ width: 290
+ height: 290
+ ViewportTestItem {
+ anchors.fill: parent
+ Rectangle {
+ id: viewportFillingRect
+ color: "transparent"
+ border.color: "red"
+ border.width: 3
+ x: parent.viewport.x
+ y: parent.viewport.y
+ width: parent.viewport.width
+ height: parent.viewport.height
+ }
+ }
+ }
+ }
+ }
+ Text {
+ text: "viewport " + viewportFillingRect.width + " x " + viewportFillingRect.height
+ }
+}