代码拉取完成,页面将自动刷新
import QtQuick 2.4
import QtQuick.Controls 2.2
Rectangle {
id: launch
width: 400
height: 400
color: "#acdcaf"
SDGUI {
id: sdgui
visible: false
objectName: "objsdui"
anchors.fill: parent
}
SPGUI {
id: spgui
visible: false
objectName: "objspui"
anchors.fill: parent
}
Item {
id: item1
x: 42
y: 127
width: 340
height: 150
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Button {
id: btnsd
x: 0
y: 40
width: 150
height: 150
text: qsTr("SD")
anchors.verticalCenter: parent.verticalCenter
font.bold: true
font.pointSize: 20
}
Button {
id: btnsp
x: 190
y: 44
width: 150
height: 150
text: qsTr("SP")
anchors.verticalCenter: parent.verticalCenter
font.bold: true
font.pointSize: 20
}
}
Connections {
target: btnsd
onClicked: {
launch.state = "offlinemap"
}
}
Button {
id: btnhome
x: 0
y: 298
width: 100
height: 100
anchors.bottom: parent.bottom
text: qsTr("Home")
visible: false
anchors.bottomMargin: 0
}
Connections {
target: btnhome
onClicked: launch.state = ""
}
Connections {
target: btnsp
onClicked: launch.state = "statespui"
}
states: [
State {
name: "offlinemap"
PropertyChanges {
target: item1
visible: false
}
PropertyChanges {
target: btnhome
x: 1
y: 298
anchors.bottomMargin: 2
visible: true
}
PropertyChanges {
target: sdgui
visible: true
}
PropertyChanges {
target: spgui
visible: false
}
},
State {
name: "statespui"
PropertyChanges {
target: item1
visible: false
}
PropertyChanges {
target: btnhome
visible: true
}
PropertyChanges {
target: sdgui
visible: false
}
PropertyChanges {
target: spgui
visible: true
}
}
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。