FluentUI/example/qml-Qt6/page/T_Tour.qml

81 lines
2.0 KiB
QML
Raw Normal View History

2023-08-24 15:50:37 +08:00
import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
2024-01-25 17:26:50 +08:00
import "../component"
2023-08-24 15:50:37 +08:00
FluScrollablePage{
2024-03-09 18:26:54 +08:00
title: qsTr("Tour")
2023-08-24 15:50:37 +08:00
FluTour{
id:tour
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-24 15:50:37 +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-24 15:50:37 +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-24 15:50:37 +08:00
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("Upload"))
2023-08-24 15:50:37 +08:00
}
}
FluFilledButton{
2024-03-09 15:35:48 +08:00
id: btn_save
text: qsTr("Save")
2023-08-24 15:50:37 +08:00
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("Save"))
2023-08-24 15:50:37 +08:00
}
}
FluIconButton{
2024-03-09 15:35:48 +08:00
id: btn_more
2023-08-24 15:50:37 +08:00
iconSource: FluentIcons.More
onClicked: {
2024-03-09 15:35:48 +08:00
showInfo(qsTr("More"))
2023-08-24 15:50:37 +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}
]
}'
}
}