aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickabstractbutton_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-01 19:18:31 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-03 09:35:49 +0000
commita108298bb9529dd1ad4b195849f3c1e12daa82bf (patch)
tree73510314439ab8c13764d1ed906b7e9154d53d15 /src/templates/qquickabstractbutton_p.h
parent92aa5333846081b294fc332e64f7e49b329edf92 (diff)
Add AbstractButton::autoExclusive
This feature is adopted from QtWidgets' QAbstractButton. It's no longer necessary to create an ExclusiveGroup to manage a simple list of radio buttons: Column { RadioButton { text: "Option 1" } RadioButton { text: "Option 2" } } Change-Id: Ib4cb718c3b3034c9c956b2f23db4b06b00547b8e Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickabstractbutton_p.h')
-rw-r--r--src/templates/qquickabstractbutton_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/templates/qquickabstractbutton_p.h b/src/templates/qquickabstractbutton_p.h
index 5ab24a23..53d17af3 100644
--- a/src/templates/qquickabstractbutton_p.h
+++ b/src/templates/qquickabstractbutton_p.h
@@ -62,6 +62,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickAbstractButton : public QQuickControl
Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL)
Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL)
+ Q_PROPERTY(bool autoExclusive READ autoExclusive WRITE setAutoExclusive NOTIFY autoExclusiveChanged FINAL)
Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL)
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
@@ -81,8 +82,8 @@ public:
bool isCheckable() const;
void setCheckable(bool checkable);
- bool isExclusive() const;
- void setExclusive(bool exclusive);
+ bool autoExclusive() const;
+ void setAutoExclusive(bool exclusive);
bool autoRepeat() const;
void setAutoRepeat(bool repeat);
@@ -106,6 +107,7 @@ Q_SIGNALS:
void pressedChanged();
void checkedChanged();
void checkableChanged();
+ void autoExclusiveChanged();
void autoRepeatChanged();
void indicatorChanged();
void labelChanged();