diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-05-29 10:58:38 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-30 12:07:21 +0200 |
commit | 251a267fb5a48790b1446b5eda3ee553cd4abfab (patch) | |
tree | 1dc788762c7cf6e5de82ecedcbe8aad58f781011 /examples/quick/window | |
parent | 124473935a99598bfe63538c5a388590cc1cc229 (diff) |
Diffstat (limited to 'examples/quick/window')
-rw-r--r-- | examples/quick/window/Splash.qml | 11 | ||||
-rw-r--r-- | examples/quick/window/window.qml | 7 |
2 files changed, 12 insertions, 6 deletions
diff --git a/examples/quick/window/Splash.qml b/examples/quick/window/Splash.qml index 092e6e6fc2..c981bd2585 100644 --- a/examples/quick/window/Splash.qml +++ b/examples/quick/window/Splash.qml @@ -43,6 +43,7 @@ import QtQuick.Window 2.1 //! [splash-properties] Window { + id: splash visible: true width: splashImage.width height: splashImage.height @@ -50,7 +51,8 @@ Window { title: "Splash Window" modality: Qt.ApplicationModal flags: Qt.SplashScreen - property int timeout: 2000 + property int timeoutInterval: 2000 + signal timeout //! [splash-properties] //! [screen-properties] x: (Screen.width - splashImage.width) / 2 @@ -67,8 +69,11 @@ Window { } //! [timer] Timer { - interval: timeout; running: true; repeat: false - onTriggered: visible = false + interval: timeoutInterval; running: true; repeat: false + onTriggered: { + visible = false + splash.timeout() + } } //! [timer] } diff --git a/examples/quick/window/window.qml b/examples/quick/window/window.qml index 1d7282f7a1..67e2ba40ff 100644 --- a/examples/quick/window/window.qml +++ b/examples/quick/window/window.qml @@ -46,14 +46,11 @@ QtObject { property real defaultSpacing: 10 property SystemPalette palette: SystemPalette { } - property var splashWindow: Splash { } - property var controlWindow: Window { width: 400 height: col.implicitHeight + defaultSpacing * 2 color: palette.window title: "Control Window" - visible: true Column { id: col anchors.fill: parent @@ -177,4 +174,8 @@ QtObject { } } } + + property var splashWindow: Splash { + onTimeout: controlWindow.visible = true + } } |