mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-01 00:27:32 +08:00
119 lines
3.1 KiB
QML
119 lines
3.1 KiB
QML
|
import QtQuick
|
||
|
import QtQuick.Layouts
|
||
|
import QtQuick.Window
|
||
|
import QtQuick.Controls
|
||
|
import FluentUI
|
||
|
import "qrc:///example/qml/component"
|
||
|
|
||
|
FluScrollablePage{
|
||
|
|
||
|
title:"Dialog"
|
||
|
|
||
|
FluArea{
|
||
|
Layout.fillWidth: true
|
||
|
height: 68
|
||
|
paddings: 10
|
||
|
Layout.topMargin: 20
|
||
|
FluButton{
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
Layout.topMargin: 20
|
||
|
text:"Show Double Button Dialog"
|
||
|
onClicked: {
|
||
|
double_btn_dialog.open()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
CodeExpander{
|
||
|
Layout.fillWidth: true
|
||
|
Layout.topMargin: -1
|
||
|
code:'FluContentDialog{
|
||
|
id:dialog
|
||
|
title:"友情提示"
|
||
|
message:"确定要退出程序么?"
|
||
|
negativeText:"取消"
|
||
|
buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||
|
onNegativeClicked:{
|
||
|
showSuccess("点击取消按钮")
|
||
|
}
|
||
|
positiveText:"确定"
|
||
|
onPositiveClicked:{
|
||
|
showSuccess("点击确定按钮")
|
||
|
}
|
||
|
}
|
||
|
dialog.open()'
|
||
|
}
|
||
|
|
||
|
FluContentDialog{
|
||
|
id:double_btn_dialog
|
||
|
title:"友情提示"
|
||
|
message:"确定要退出程序么?"
|
||
|
buttonFlags: FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||
|
negativeText:"取消"
|
||
|
onNegativeClicked:{
|
||
|
showSuccess("点击取消按钮")
|
||
|
}
|
||
|
positiveText:"确定"
|
||
|
onPositiveClicked:{
|
||
|
showSuccess("点击确定按钮")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
FluArea{
|
||
|
Layout.fillWidth: true
|
||
|
height: 68
|
||
|
paddings: 10
|
||
|
Layout.topMargin: 20
|
||
|
FluButton{
|
||
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
Layout.topMargin: 20
|
||
|
text:"Show Triple Button Dialog"
|
||
|
onClicked: {
|
||
|
triple_btn_dialog.open()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
CodeExpander{
|
||
|
Layout.fillWidth: true
|
||
|
Layout.topMargin: -1
|
||
|
code:'FluContentDialog{
|
||
|
id:dialog
|
||
|
title:"友情提示"
|
||
|
message:"确定要退出程序么?"
|
||
|
negativeText:"取消"
|
||
|
buttonFlags: FluContentDialogType.NeutralButton | FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||
|
negativeText:"取消"
|
||
|
onNegativeClicked:{
|
||
|
showSuccess("点击取消按钮")
|
||
|
}
|
||
|
positiveText:"确定"
|
||
|
onPositiveClicked:{
|
||
|
showSuccess("点击确定按钮")
|
||
|
}
|
||
|
neutralText:"最小化"
|
||
|
onNeutralClicked:{
|
||
|
showSuccess("点击最小化按钮")
|
||
|
}
|
||
|
}
|
||
|
dialog.open()'
|
||
|
}
|
||
|
|
||
|
FluContentDialog{
|
||
|
id:triple_btn_dialog
|
||
|
title:"友情提示"
|
||
|
message:"确定要退出程序么?"
|
||
|
buttonFlags: FluContentDialogType.NeutralButton | FluContentDialogType.NegativeButton | FluContentDialogType.PositiveButton
|
||
|
negativeText:"取消"
|
||
|
onNegativeClicked:{
|
||
|
showSuccess("点击取消按钮")
|
||
|
}
|
||
|
positiveText:"确定"
|
||
|
onPositiveClicked:{
|
||
|
showSuccess("点击确定按钮")
|
||
|
}
|
||
|
neutralText:"最小化"
|
||
|
onNeutralClicked:{
|
||
|
showSuccess("点击最小化按钮")
|
||
|
}
|
||
|
}
|
||
|
}
|