FluentUI/Gallery/res/qml/page/T_Tour.qml
yxdy a44db97aa3
Some checks failed
Gallery App Build / Windows (push) Has been cancelled
Gallery App Build / macOS (push) Has been cancelled
Gallery App Build / Ubuntu (push) Has been cancelled
init
2025-02-12 10:31:20 +08:00

76 lines
1.8 KiB
QML

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI.Controls
import Gallery
ScrollablePage {
title: qsTr("Tour")
CardHighlight{
Layout.fillWidth: true
showDisabled: false
codeSnippet:
`import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI.Controls
ColumnLayout {
width: parent.width
Tour{
id:tour
Component.onCompleted:{
steps.push({title:qsTr("Upload File"),description: qsTr("Put your files here."),target:()=>btn_upload})
steps.push({title:qsTr("Save"),description: qsTr("Save your changes."),target:()=>btn_save})
steps.push({title:qsTr("Other Actions"),description: qsTr("Click to see other actions."),target:()=>btn_more,isLast:true})
}
}
Frame{
Layout.fillWidth: true
Layout.preferredHeight: 130
padding: 10
FilledButton{
anchors{
top: parent.top
topMargin: 14
}
text: qsTr("Begin Tour")
onClicked: {
tour.open()
}
}
Row{
spacing: 20
anchors{
top: parent.top
topMargin: 60
}
Button{
id: btn_upload
text: qsTr("Upload")
onClicked: {
}
}
FilledButton{
id: btn_save
text: qsTr("Save")
onClicked: {
}
}
IconButton{
id: btn_more
icon.name: FluentIcons.graph_More
icon.width: 15
icon.height: 15
onClicked: {
}
}
}
}
}
`}
}