diff options
Diffstat (limited to 'examples/quick/window/window.qml')
-rw-r--r-- | examples/quick/window/window.qml | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/examples/quick/window/window.qml b/examples/quick/window/window.qml index d50bce61b3..d27ab3d0a3 100644 --- a/examples/quick/window/window.qml +++ b/examples/quick/window/window.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import QtQuick.Window 2.1 +import QtQuick.Window 2.3 import "../shared" as Shared QtObject { @@ -47,7 +47,7 @@ QtObject { property SystemPalette palette: SystemPalette { } property var controlWindow: Window { - width: visibilityLabel.implicitWidth * 1.2 + width: col.implicitWidth + defaultSpacing * 2 height: col.implicitHeight + defaultSpacing * 2 color: palette.window title: "Control Window" @@ -57,7 +57,7 @@ QtObject { anchors.margins: defaultSpacing spacing: defaultSpacing property real cellWidth: col.width / 3 - spacing - Text { text: "Control the second window:" } + Shared.Label { text: "Control the second window:" } Grid { id: grid columns: 3 @@ -121,18 +121,23 @@ QtObject { } return "unknown"; } - Text { + Shared.Label { id: visibilityLabel text: "second window is " + (testWindow.visible ? "visible" : "invisible") + " and has visibility " + parent.visibilityToString(testWindow.visibility) } Rectangle { - id: horizontalRule - color: "black" + color: palette.text width: parent.width height: 1 } - ScreenInfo { } + CurrentScreen { } + Rectangle { + color: palette.text + width: parent.width + height: 1 + } + AllScreens { width: parent.width } } } @@ -145,7 +150,7 @@ QtObject { Rectangle { anchors.fill: parent anchors.margins: defaultSpacing - Text { + Shared.Label { anchors.centerIn: parent text: "Second Window" } |