FluentUI/example/qml/page/T_Tour.qml

80 lines
2.0 KiB
QML
Raw Permalink 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
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
]
}
2024-03-29 16:56:09 +08:00
FluFrame{
2023-08-07 18:18:04 +08:00
Layout.fillWidth: true
2024-03-29 16:23:16 +08:00
Layout.preferredHeight: 130
padding: 10
2023-08-07 18:18:04 +08:00
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
2024-03-29 16:23:16 +08:00
Layout.topMargin: -6
2023-08-07 22:11:08 +08:00
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
}