summaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-01-26 16:18:00 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-01-27 17:22:32 +0000
commit68932f24c66e2589bc202f4b5b7c248b7d19e6be (patch)
tree0333cec10f0976aa3dbd3126364701ebfc0dea7e /examples/quick
parente74a1d0b342f2c95dc3a543c8c9ec07fd52d8fe0 (diff)
Add 10mm rectangle to screen example to verify Screen.pixelDensity
Change-Id: Icaca370be3eae3ed50971e5bd2f6f5f7278c2962 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/window/CurrentScreen.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/quick/window/CurrentScreen.qml b/examples/quick/window/CurrentScreen.qml
index c65baab1f4..09fbce9a74 100644
--- a/examples/quick/window/CurrentScreen.qml
+++ b/examples/quick/window/CurrentScreen.qml
@@ -101,5 +101,12 @@ Item {
Shared.Label { text: "primary orientation" }
Shared.Label { text: orientationToString(Screen.primaryOrientation) + " (" + Screen.primaryOrientation + ")" }
//! [screen]
+
+ Shared.Label { text: "10mm rectangle" }
+ Rectangle {
+ color: "red"
+ width: Screen.pixelDensity * 10
+ height: width
+ }
}
}