summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2014-03-20 16:03:19 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-20 16:34:58 +0100
commit75f3d43dbd7ed85a98572d2e3878388fe93ea14c (patch)
tree06591c434da2d90f15aabb3cb8b4a2d1ec2e9e66
parent3adb18503a865e0bb826cb1b5be059572bb96594 (diff)
Set numerical input hint on SpinBox
Since we don't allow you to override the text validator, we guarantee that the only thing you are allowed to type in a SpinBox are numbers. [ChangeLog][QtQuickControls][SpinBox] SpinBox now only shows the numerical keys in onscreen keyboards where possible. Task-number: QTBUG-37619 Change-Id: If6412d1dc49bf0e602330e90963e8cd990f5d43c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r--src/controls/SpinBox.qml1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 826d9002f..26ba41b0c 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -261,6 +261,7 @@ Control {
horizontalAlignment: spinbox.horizontalAlignment
verticalAlignment: __panel ? __panel.verticalAlignment : Qt.AlignVCenter
selectByMouse: activeFocus || activeFocusOnPress
+ inputMethodHints: Qt.ImhFormattedNumbersOnly
validator: SpinBoxValidator {
id: validator