FluentUI/example/T_Dialog.qml

52 lines
1.0 KiB
QML
Raw Normal View History

2023-03-06 18:08:01 +08:00
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtGraphicalEffects 1.15
import FluentUI 1.0
Item {
2023-03-07 00:05:27 +08:00
2023-03-06 18:08:01 +08:00
FluText{
id:title
2023-03-07 00:05:27 +08:00
text:"Dialog"
2023-03-06 18:08:01 +08:00
fontStyle: FluText.TitleLarge
}
2023-03-07 00:05:27 +08:00
FluContentDialog{
id:dialog
title:"友情提示"
message:"确定要退出程序么?"
negativeText:"取消"
onNegativeClicked:{
showSuccess("点击取消按钮")
}
positiveText:"确定"
onPositiveClicked:{
showSuccess("点击确定按钮")
}
}
2023-03-06 18:08:01 +08:00
ScrollView{
clip: true
width: parent.width
contentWidth: parent.width
anchors{
top: title.bottom
bottom: parent.bottom
}
ColumnLayout{
spacing: 5
FluButton{
Layout.topMargin: 20
text:"Show Dialog"
onClicked: {
2023-03-07 00:05:27 +08:00
dialog.open()
2023-03-06 18:08:01 +08:00
}
}
}
}
}