FluentUI/example/qml/page/T_Tour.qml

82 lines
2.0 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-07 18:18:04 +08:00
import "qrc:///example/qml/component"
2023-08-26 17:20:30 +08:00
import "../component"
2023-08-07 18:18:04 +08:00
FluScrollablePage{
title:"Tour"
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}
]
}
FluArea{
Layout.fillWidth: true
height: 130
paddings: 10
Layout.topMargin: 20
FluFilledButton{
anchors{
top: parent.top
topMargin: 14
}
text:"Begin Tour"
onClicked: {
tour.open()
}
}
Row{
spacing: 20
anchors{
top: parent.top
topMargin: 60
}
FluButton{
id:btn_upload
text:"Upload"
2023-08-07 21:46:54 +08:00
onClicked: {
showInfo("Upload")
}
2023-08-07 18:18:04 +08:00
}
FluFilledButton{
id:btn_save
text:"Save"
2023-08-07 21:46:54 +08:00
onClicked: {
showInfo("Save")
}
2023-08-07 18:18:04 +08:00
}
FluIconButton{
id:btn_more
iconSource: FluentIcons.More
2023-08-07 21:46:54 +08:00
onClicked: {
showInfo("More")
}
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
}