HButton: add "uncheckable" property

This commit is contained in:
miruka 2020-07-12 15:48:28 -04:00
parent 370418bcf5
commit e3b6f3eb54

View File

@ -21,6 +21,7 @@ Button {
property bool circle: false property bool circle: false
property bool padded: true property bool padded: true
property bool enableRadius: false property bool enableRadius: false
property bool uncheckable: true
property HToolTip toolTip: HToolTip { property HToolTip toolTip: HToolTip {
id: toolTip id: toolTip
@ -71,4 +72,9 @@ Button {
when: disableWhileLoading && button.loading when: disableWhileLoading && button.loading
value: false value: false
} }
MouseArea {
anchors.fill: parent
enabled: ! parent.uncheckable && parent.checked
}
} }