aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickabstractbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/qquickabstractbutton.cpp')
-rw-r--r--src/templates/qquickabstractbutton.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/templates/qquickabstractbutton.cpp b/src/templates/qquickabstractbutton.cpp
index 74058daf..d2f1c7ec 100644
--- a/src/templates/qquickabstractbutton.cpp
+++ b/src/templates/qquickabstractbutton.cpp
@@ -109,7 +109,7 @@ static const int AUTO_REPEAT_INTERVAL = 100;
*/
QQuickAbstractButtonPrivate::QQuickAbstractButtonPrivate() :
- pressed(false), checked(false), checkable(false), autoExclusive(false), autoRepeat(false),
+ pressed(false), checked(false), checkable(false), highlighted(false), autoExclusive(false), autoRepeat(false),
delayTimer(0), repeatTimer(0), repeatButton(Qt::NoButton), label(Q_NULLPTR), indicator(Q_NULLPTR), group(Q_NULLPTR)
{
}
@@ -297,6 +297,31 @@ void QQuickAbstractButton::setCheckable(bool checkable)
}
/*!
+ \qmlproperty bool Qt.labs.controls::AbstractButton::highlighted
+
+ This property holds whether the button is highlighted.
+
+ A button can be highlighted in order to draw the user's attention towards
+ it. It has no effect on keyboard interaction.
+
+ The default value is \c false.
+*/
+bool QQuickAbstractButton::isHighlighted() const
+{
+ Q_D(const QQuickAbstractButton);
+ return d->highlighted;
+}
+
+void QQuickAbstractButton::setHighlighted(bool highlighted)
+{
+ Q_D(QQuickAbstractButton);
+ if (highlighted != d->highlighted) {
+ d->highlighted = highlighted;
+ emit highlightedChanged();
+ }
+}
+
+/*!
\qmlproperty bool Qt.labs.controls::AbstractButton::autoExclusive
This property holds whether auto-exclusivity is enabled.