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:
parent
e74a1d0b34
commit
68932f24c6
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue