aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/Splash.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/window/Splash.qml')
-rw-r--r--examples/quick/window/Splash.qml19
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/quick/window/Splash.qml b/examples/quick/window/Splash.qml
index 0a7da219d..698942554 100644
--- a/examples/quick/window/Splash.qml
+++ b/examples/quick/window/Splash.qml
@@ -24,19 +24,20 @@ Window {
Image {
id: splashImage
source: Images.qtLogo
- MouseArea {
- anchors.fill: parent
- onClicked: Qt.quit()
+ TapHandler {
+ onTapped: splash.exit()
}
}
+
+ function exit() {
+ splash.visible = false
+ splash.timeout()
+ }
+
//! [timer]
Timer {
- interval: splash.timeoutInterval; running: true; repeat: false
- onTriggered: {
- splash.visible = false
- splash.timeout()
- }
+ interval: splash.timeoutInterval; running: splash.visible; repeat: false
+ onTriggered: splash.exit()
}
//! [timer]
- Component.onCompleted: visible = true
}