From e2764c722571025835e41632637d1421ba44fb02 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 17 Oct 2014 14:24:07 +0200 Subject: Screen attached property: expose devicePixelRatio property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig Reviewed-by: Richard Moe Gustavsen Reviewed-by: Morten Johan Sørvig --- examples/quick/window/ScreenInfo.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples') 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 } -- cgit v1.2.3