mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 15:06:52 +08:00
73 lines
2.0 KiB
QML
73 lines
2.0 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Window
|
|
import QtQuick.Controls
|
|
import FluentUI
|
|
import "../component"
|
|
|
|
FluScrollablePage{
|
|
|
|
title: qsTr("InfoBar")
|
|
|
|
FluArea{
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 20
|
|
height: 270
|
|
paddings: 10
|
|
ColumnLayout{
|
|
spacing: 14
|
|
anchors{
|
|
verticalCenter: parent.verticalCenter
|
|
left: parent.left
|
|
}
|
|
FluButton{
|
|
text: qsTr("Info")
|
|
onClicked: {
|
|
showInfo(qsTr("This is an InfoBar in the Info Style"))
|
|
}
|
|
}
|
|
FluButton{
|
|
text: qsTr("Warning")
|
|
onClicked: {
|
|
showWarning(qsTr("This is an InfoBar in the Warning Style"))
|
|
}
|
|
}
|
|
FluButton{
|
|
text:"Error"
|
|
onClicked: {
|
|
showError(qsTr("This is an InfoBar in the Error Style"))
|
|
}
|
|
}
|
|
FluButton{
|
|
text:"Success"
|
|
onClicked: {
|
|
showSuccess(qsTr("This is an InfoBar in the Success Style"))
|
|
}
|
|
}
|
|
FluButton{
|
|
text: qsTr("InfoBar that needs to be turned off manually")
|
|
onClicked: {
|
|
showInfo(qsTr("This is an InfoBar in the Info Style"),0,qsTr("Manual shutdown is supported"))
|
|
}
|
|
}
|
|
FluButton{
|
|
text:"Loading"
|
|
onClicked: {
|
|
showLoading()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
CodeExpander{
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: -1
|
|
code:'showInfo(qsTr("This is an InfoBar in the Info Style"))
|
|
|
|
showWarning(qsTr("This is an InfoBar in the Warning Style"))
|
|
|
|
showError(qsTr("This is an InfoBar in the Error Style"))
|
|
|
|
showSuccess(qsTr("This is an InfoBar in the Success Style"))'
|
|
}
|
|
}
|