aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/window.qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-12-16 10:58:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-18 13:14:34 +0100
commita34eddbf7a68360ead218b2f5a9215e6b1ae88ec (patch)
tree13343c25b48c8dcca0e38495014f658c757c6742 /examples/quick/window/window.qml
parentccaa64ffd44faedbfe7297680939b40327bc5334 (diff)
QtQuick window example improvements: window size and DPI info
On high-resolution displays it's important to size the window so that the content will fit. Also show the DPI conversion for pixel density. Change-Id: Ie35852ecff0bb0ee5ab9b77c6c18e82cfc300448 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'examples/quick/window/window.qml')
-rw-r--r--examples/quick/window/window.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/quick/window/window.qml b/examples/quick/window/window.qml
index 00daec7ff1..7bb2ce6cac 100644
--- a/examples/quick/window/window.qml
+++ b/examples/quick/window/window.qml
@@ -47,7 +47,7 @@ QtObject {
property SystemPalette palette: SystemPalette { }
property var controlWindow: Window {
- width: 400
+ width: visibilityLabel.implicitWidth * 1.2
height: col.implicitHeight + defaultSpacing * 2
color: palette.window
title: "Control Window"
@@ -122,6 +122,7 @@ QtObject {
return "unknown";
}
Text {
+ id: visibilityLabel
text: "second window is " + (testWindow.visible ? "visible" : "invisible") +
" and has visibility " + parent.visibilityToString(testWindow.visibility)
}