FluentUI/example/qml/page/T_Tour.qml

84 lines
2.1 KiB
QML
Raw Normal View History

2023-08-24 15:50:37 +08:00
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import FluentUI 1.0
2023-08-26 17:20:30 +08:00
import "../component"
2023-08-07 18:18:04 +08:00
FluScrollablePage{
2024-03-09 18:26:54 +08:00
title: qsTr("Tour")
2023-08-07 18:18:04 +08:00
FluTour{
id:tour
2024-03-09 15:35:48 +08:00
finishText: qsTr("Finish")
nextText: qsTr("Next")
previousText: qsTr("Previous")
2023-08-07 18:18:04 +08:00
steps:[
2024-03-09 15:35:48 +08:00
{title:qsTr("Upload File"),description: qsTr("Put your files here."),target:()=>btn_upload},
{title:qsTr("Save"),description: qsTr("Save your changes."),target:()=>btn_save},
{title:qsTr("Other Actions"),description: qsTr("Click to see other actions."),target:()=>btn_more}
2023-08-07 18:18:04 +08:00
]
}
FluArea{
Layout.fillWidth: true
height: 130
paddings: 10
Layout.topMargin: 20
FluFilledButton{
anchors{
top: parent.top
topMargin: 14
}
2024-03-09 15:35:48 +08:00
text: qsTr("Begin Tour")
2023-08-07 18:18:04 +08:00
onClicked: {
tour.open()
}
}
Row{
spacing: 20
anchors{
top: parent.top
topMargin: 60
}
FluButton{
2024-03-09 15:35:48 +08:00
id: btn_upload
text: qsTr("Upload")
2023-08-07 21:46:54 +08:00
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("Upload"))
2023-08-07 21:46:54 +08:00
}
2023-08-07 18:18:04 +08:00
}
FluFilledButton{
2024-03-09 15:35:48 +08:00
id: btn_save
text: qsTr("Save")
2023-08-07 21:46:54 +08:00
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("Save"))
2023-08-07 21:46:54 +08:00
}
2023-08-07 18:18:04 +08:00
}
FluIconButton{
2024-03-09 15:35:48 +08:00
id: btn_more
2023-08-07 18:18:04 +08:00
iconSource: FluentIcons.More
2023-08-07 21:46:54 +08:00
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("More"))
2023-08-07 21:46:54 +08:00
}
2023-08-07 18:18:04 +08:00
}
}
}
2023-08-07 22:11:08 +08:00
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluTour{
id:tour
steps:[
{title:"Upload File",description: "Put your files here.",target:()=>btn_upload},
{title:"Save",description: "Save your changes.",target:()=>btn_save},
{title:"Other Actions",description: "Click to see other actions.",target:()=>btn_more}
]
}'
}
2023-08-07 18:18:04 +08:00
}