diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2012-11-05 11:16:14 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-07 15:55:27 +0100 |
commit | 99b7d495530335bef8590e6b8a1266e3ec570955 (patch) | |
tree | 1da4d9083d9234fc0a16750acc0eb3634d0c80a3 /examples/window/window/standalone.qml | |
parent | a3220e460bdcb9bc878bfe37721a7798ac8c2d64 (diff) |
Examples separated out of Ie808e78a42074e13aa9d3c87723ec9ac8fdbaf4av5.0.0-beta2
Change-Id: Iec54ed5d7c41c6103ddfe07509b905914806d435
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'examples/window/window/standalone.qml')
-rw-r--r-- | examples/window/window/standalone.qml | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/examples/window/window/standalone.qml b/examples/window/window/standalone.qml index 5d96c37142..079694cc10 100644 --- a/examples/window/window/standalone.qml +++ b/examples/window/window/standalone.qml @@ -39,25 +39,41 @@ ****************************************************************************/ import QtQuick 2.0 -import QtQuick.Window 2.0 as Window +import QtQuick.Window 2.0 Item { - width: 640 - height: 480 + width: 320 + height: 240 Text { anchors.centerIn: parent text: "First Window" } - MouseArea { - anchors.fill: parent - onClicked: Qt.quit() + Rectangle { + border.color: "black" + color: childWindow.visible ? "green" : "yellow" + radius: height / 4 + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.margins: 10 + width: text.implicitWidth + 20 + height: text.implicitHeight + 20 + Text { + id: text + text: "Pop up window" + anchors.centerIn: parent + } + MouseArea { + anchors.fill: parent + onClicked: childWindow.visible = !childWindow.visible + } } - Window.Window { - width: 640 - height: 480 - x: 640 - y: 480 - visible: true + + Window { + id: childWindow + width: 320 + height: 240 + x: 320 + y: 240 color: "green" Text { anchors.centerIn: parent |