2024-03-31 10:59:15 +08:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Window 2.15
|
|
|
|
import FluentUI 1.0
|
|
|
|
import "../component"
|
|
|
|
|
|
|
|
FluScrollablePage{
|
|
|
|
|
|
|
|
title: qsTr("GroupBox")
|
|
|
|
|
|
|
|
FluGroupBox {
|
|
|
|
title: qsTr("CheckBox Group")
|
|
|
|
ColumnLayout {
|
|
|
|
spacing: 10
|
|
|
|
anchors.fill: parent
|
|
|
|
FluCheckBox { text: qsTr("E-mail") }
|
|
|
|
FluCheckBox { text: qsTr("Calendar") }
|
|
|
|
FluCheckBox { text: qsTr("Contacts") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FluGroupBox {
|
|
|
|
title: qsTr("RadioButton Group")
|
2024-05-08 21:10:00 +08:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: 150
|
|
|
|
Layout.topMargin: 20
|
2024-03-31 10:59:15 +08:00
|
|
|
FluRadioButtons {
|
2024-05-08 21:10:00 +08:00
|
|
|
anchors{
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
left: parent.left
|
|
|
|
}
|
2024-03-31 10:59:15 +08:00
|
|
|
spacing: 10
|
2024-05-08 21:10:00 +08:00
|
|
|
disabled: radio_button_switch.checked
|
2024-03-31 10:59:15 +08:00
|
|
|
FluRadioButton { text: qsTr("E-mail") }
|
|
|
|
FluRadioButton { text: qsTr("Calendar") }
|
|
|
|
FluRadioButton { text: qsTr("Contacts") }
|
|
|
|
}
|
2024-05-08 21:10:00 +08:00
|
|
|
|
|
|
|
FluToggleSwitch{
|
|
|
|
id: radio_button_switch
|
|
|
|
anchors{
|
|
|
|
right: parent.right
|
|
|
|
verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
text: qsTr("Disabled")
|
|
|
|
}
|
2024-03-31 10:59:15 +08:00
|
|
|
}
|
|
|
|
|
2024-05-08 21:10:00 +08:00
|
|
|
|
2024-03-31 10:59:15 +08:00
|
|
|
CodeExpander{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.topMargin: 4
|
2024-05-08 21:10:00 +08:00
|
|
|
code:`
|
|
|
|
FluGroupBox {
|
2024-03-31 10:59:15 +08:00
|
|
|
title: qsTr("CheckBox Group")
|
|
|
|
ColumnLayout {
|
|
|
|
spacing: 10
|
|
|
|
anchors.fill: parent
|
|
|
|
FluCheckBox { text: qsTr("E-mail") }
|
|
|
|
FluCheckBox { text: qsTr("Calendar") }
|
|
|
|
FluCheckBox { text: qsTr("Contacts") }
|
|
|
|
}
|
2024-05-08 21:10:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
FluGroupBox {
|
|
|
|
title: qsTr("RadioButton Group")
|
|
|
|
FluRadioButtons {
|
|
|
|
spacing: 10
|
|
|
|
disabled: true // 禁用所有FluRadioButton子组件
|
|
|
|
manuallyDisabled: true // 是否指定每个FluRadioButton上的disabled选项
|
|
|
|
FluRadioButton { text: qsTr("E-mail") }
|
|
|
|
FluRadioButton { text: qsTr("Calendar") }
|
|
|
|
FluRadioButton { text: qsTr("Contacts") }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
2024-03-31 10:59:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|