The window takes time to resize itself; we can avoid letting the user
see that by delaying visibility of the main window.
Change-Id: I81d656102b384a66b5539cbd879aadb85261ba33
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
//! [splash-properties]
Window {
+ id: splash
visible: true
width: splashImage.width
height: splashImage.height
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
}
//! [timer]
Timer {
- interval: timeout; running: true; repeat: false
- onTriggered: visible = false
+ interval: timeoutInterval; running: true; repeat: false
+ onTriggered: {
+ visible = false
+ splash.timeout()
+ }
}
//! [timer]
}
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
}
}
}
+
+ property var splashWindow: Splash {
+ onTimeout: controlWindow.visible = true
+ }
}