diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-06-05 09:54:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-06 09:37:14 +0200 |
commit | 420bb714a8c8ebc67ad958897939d7d96e11806c (patch) | |
tree | a01cca701a930cba8710fd4cb9a5bb9abaaf9054 /src/controls/SpinBox.qml | |
parent | 0ad4925f94c86dbe75e01d890fdb9fce64ca52fe (diff) | |
download | qtquickcontrols-420bb714a8c8ebc67ad958897939d7d96e11806c.tar.gz |
Expose hovered to our controls and document it consistently
The current solution is messy and we only expose it partially to
some of our styles. I think we should simply expose this to all.
Change-Id: Ia546d5657ea416df99c9d9d92cc714b7f1c928fe
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Diffstat (limited to 'src/controls/SpinBox.qml')
-rw-r--r-- | src/controls/SpinBox.qml | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 68f97e0a..b1f87cec 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -134,12 +134,19 @@ Control { */ property alias font: input.font - /*! This property indicates if the Spinbox should get active + /*! This property indicates whether the Spinbox should get active focus when pressed. The default value is \c true. */ property bool activeFocusOnPress: true + /*! + \qmlproperty bool SpinBox::hovered + + This property indicates whether the control is being hovered. + */ + readonly property alias hovered: mouseArea.containsMouse + style: Qt.createComponent(Settings.style + "/SpinBoxStyle.qml", spinbox) /*! \internal */ @@ -166,8 +173,6 @@ Control { readonly property alias downPressed: mouseDown.pressed readonly property alias downHovered: mouseDown.containsMouse - readonly property alias hovered: mouseArea.containsMouse - readonly property int contentHeight: Math.max(input.implicitHeight, 16) readonly property int contentWidth: Math.max(maxSizeHint.implicitWidth, minSizeHint.implicitWidth) } |