aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/plugins.qmltypes
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-16 12:26:34 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-16 14:50:14 +0000
commitc69c1f32b0b42adb670c08653282a86cc411b239 (patch)
tree8c59961682c60c76e1806200ee541958f16e92e1 /src/imports/controls/plugins.qmltypes
parent0edce6c41e9b193c7482334e313c4886c94702f1 (diff)
Restore AbstractButton::checkable
In 7a8f055, we hid the checkable property from QQuickAbstractButton and exposed it only in QQuickButton and QQuickMenuItem. The reasoning was that QQuickCheckBox, QQuickRadioButton, QQuickSwitch and their delegate counterparts are inherently checkable, so having the checkable property available in QML didn't seem to make sense. While this still holds true, there are other factors to take into consideration. AbstractButton is meant to be a generic base class for all types of buttons, but the lack of a checkable property makes it unusable as a base class for custom QML-based checkable buttons. If we want to a hide the checkable property from CheckBox, RadioButton, and Switch to avoid having it popup in the auto-completion list, we can probably do it in a less disruptive way via tooling. [ChangeLog][Controls][AbstractButton] The checkable property has been made accessible from QML. Previously it was only exposed for Button and MenuItem, but it is now available for any AbstractButton to make it possible to create custom QML-based checkable buttons. Task-number: QTBUG-51554 Change-Id: I19e29fc87cd15811c43c9b9ebb29701d66cde72f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/controls/plugins.qmltypes')
-rw-r--r--src/imports/controls/plugins.qmltypes3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 0a89a8b0..de4e26f8 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -508,6 +508,7 @@ Module {
Property { name: "down"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "checked"; type: "bool" }
+ Property { name: "checkable"; type: "bool" }
Property { name: "autoExclusive"; type: "bool" }
Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
Signal { name: "pressed" }
@@ -559,7 +560,6 @@ Module {
prototype: "QQuickAbstractButton"
exports: ["QtQuick.Templates/Button 2.0"]
exportMetaObjectRevisions: [0]
- Property { name: "checkable"; type: "bool" }
Property { name: "autoRepeat"; type: "bool" }
Property { name: "highlighted"; type: "bool" }
Property { name: "flat"; type: "bool" }
@@ -894,7 +894,6 @@ Module {
prototype: "QQuickAbstractButton"
exports: ["QtQuick.Templates/MenuItem 2.0"]
exportMetaObjectRevisions: [0]
- Property { name: "checkable"; type: "bool" }
Property { name: "highlighted"; type: "bool" }
Signal { name: "triggered" }
}