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>
This commit is contained in:
Richard Moe Gustavsen 2015-07-27 11:11:08 +02:00
parent f01f1943e4
commit 404430dca5

View File

@ -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;