diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-07-27 11:11:08 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-07-27 09:35:52 +0000 |
commit | 404430dca5b85bb197c8d4659060c5e3b4ac67f3 (patch) | |
tree | 8fb78625ba94f704140344854b82dfbaab2d4fc5 /src/plugins/platforms/ios | |
parent | f01f1943e49ac3a60c54dd3f3009a445474dc412 (diff) |
iOS: use UIKeyboardTypeNumbersAndPunctuation for Qt::ImhPreferNumbers
Using Qt::ImhPreferNumbers means that we should use a keyboard that
has focus on typing numbers. But it's important that we don't restrict
typing to numbers only, it also needs to support normal text input.
And this seems to be exactly what UIKeyboardTypeNumbersAndPunctuation
does.
Task-number: QTBUG-47365
Change-Id: I5bb88cedcbe0e89ea884dc9c14d3ffd9fb368060
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r-- | src/plugins/platforms/ios/qiostextresponder.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm index 52336a4e69..09839790fa 100644 --- a/src/plugins/platforms/ios/qiostextresponder.mm +++ b/src/plugins/platforms/ios/qiostextresponder.mm @@ -199,6 +199,8 @@ self.keyboardType = UIKeyboardTypePhonePad; else if (hints & Qt::ImhLatinOnly) self.keyboardType = UIKeyboardTypeASCIICapable; + else if (hints & Qt::ImhPreferNumbers) + self.keyboardType = UIKeyboardTypeNumbersAndPunctuation; else self.keyboardType = UIKeyboardTypeDefault; |