diff options
| -rw-r--r-- | src/controls/SpinBox.qml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index c756566de..4dc03d977 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -180,13 +180,15 @@ Control { /*! \internal */ function __increment() { validator.increment() - input.selectValue() + if (activeFocus) + input.selectValue() } /*! \internal */ function __decrement() { validator.decrement() - input.selectValue() + if (activeFocus) + input.selectValue() } /*! \internal */ @@ -253,7 +255,7 @@ Control { horizontalAlignment: spinbox.horizontalAlignment verticalAlignment: __panel ? __panel.verticalAlignment : Qt.AlignVCenter - selectByMouse: true + selectByMouse: activeFocus || activeFocusOnPress validator: SpinBoxValidator { id: validator |
