aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-10-17 14:24:07 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-10-23 09:03:16 +0200
commite2764c722571025835e41632637d1421ba44fb02 (patch)
treefcbe4624419e0332ba0330aa6402123c39f03523 /examples/quick/window
parenta1b43cb272ff05bd8c681d4d6320dcfee7339d84 (diff)
Screen attached property: expose devicePixelRatio property
Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'examples/quick/window')
-rw-r--r--examples/quick/window/ScreenInfo.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/quick/window/ScreenInfo.qml b/examples/quick/window/ScreenInfo.qml
index 73700720d8..d0a233f759 100644
--- a/examples/quick/window/ScreenInfo.qml
+++ b/examples/quick/window/ScreenInfo.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
-import QtQuick 2.1
+import QtQuick 2.3
import QtQuick.Window 2.1
Item {
@@ -85,6 +85,9 @@ Item {
Text { text: "logical pixel density" }
Text { text: Screen.logicalPixelDensity.toFixed(2) + " dots/mm (" + (Screen.logicalPixelDensity * 25.4).toFixed(2) + " dots/inch)" }
+ Text { text: "device pixel ratio" }
+ Text { text: Screen.devicePixelRatio.toFixed(2) }
+
Text { text: "available virtual desktop" }
Text { text: Screen.desktopAvailableWidth + "x" + Screen.desktopAvailableHeight }