From 75f3d43dbd7ed85a98572d2e3878388fe93ea14c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 20 Mar 2014 16:03:19 +0100 Subject: 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 --- src/controls/SpinBox.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 826d9002..26ba41b0 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 -- cgit v1.2.1