我正在尝试使用 QT 开发一个 android 应用程序。我想在应用程序开始时显示启动画面。启动画面将在那里停留 2 秒钟,然后将显示应用程序的主页。为此,我创建了 2 个 .qml 文件。
飞溅.qml
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Window 2.3
Window {
id: window
visible: true
width: Screen.width
height: Screen.height
signal timeout
Image {
id: image
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: 300
height: 300
source: "qrc:/../Desktop/photo_2018-03-21_19-53-06.jpg"
}
Text {
id: text1
y: image.height + image.y + 20
text: qsTr("@startimeahmet Presents")
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 25
}
Timer {
interval: 2000; running: true; repeat: false
onTriggered: {
visible = false
window.timeout() …Run Code Online (Sandbox Code Playgroud)