summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/controls/SpinBox.qml15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index bba4eae10..c756566de 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -38,7 +38,7 @@
**
****************************************************************************/
-import QtQuick 2.1
+import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Private 1.0
@@ -164,6 +164,17 @@ Control {
*/
readonly property alias hovered: mouseArea.containsMouse
+ /*!
+ \qmlsignal SpinBox::editingFinished()
+ \since 5.2
+
+ This signal is emitted when the Return or Enter key is pressed or
+ the control loses focus. Note that if there is a validator
+ set on the control and enter/return is pressed, this signal will
+ only be emitted if the validator returns an acceptable state.
+ */
+ signal editingFinished()
+
style: Qt.createComponent(Settings.style + "/SpinBoxStyle.qml", spinbox)
/*! \internal */
@@ -255,6 +266,8 @@ Control {
selectValue()
}
+ onEditingFinished: spinbox.editingFinished()
+
color: __panel ? __panel.foregroundColor : "black"
selectionColor: __panel ? __panel.selectionColor : "black"
selectedTextColor: __panel ? __panel.selectedTextColor : "black"