Add 10mm rectangle to screen example to verify Screen.pixelDensity

Change-Id: Icaca370be3eae3ed50971e5bd2f6f5f7278c2962
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-01-26 16:18:00 +01:00
parent e74a1d0b34
commit 68932f24c6
1 changed files with 7 additions and 0 deletions

View File

@ -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
}
}
}