[solved] How to force lower case keyboard in TextField?
-
wrote on 12 Sept 2011, 01:17 last edited by
Hi, I'm using a "TextField":http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-textfield.html?tab=1 from com.nokia.meego in MeeGo Harmattan. When the user taps it the virtual keyboard shows up in upper case. However, this is for a login field where we want the default to be in lower case. I can't find in the docs how to force it. Any hints?
-
wrote on 12 Sept 2011, 06:02 last edited by
As a wild guess (didn't try it for lower/upper case) will recommend to look at inputMethodHints. At least it works in case of digits.
-
wrote on 12 Sept 2011, 15:27 last edited by
Indeed! The solution is:
@ TextField {
...
inputMethodHints: Qt.ImhNoAutoUppercase@Thank you very much!
-
wrote on 12 Sept 2011, 15:39 last edited by
er... silly question: what is the right syntax to add more than one hint? I just saw that it would ve convenient to ass Qt.ImhNoPredictiveText as well but I'm not finding the right way to set it together with Qt.ImhNoAutoUppercase.
-
wrote on 13 Sept 2011, 06:52 last edited by
Hi,
You should be able to specify multiple values as follows:
@
TextField {
...
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
@Regards,
Michael -
wrote on 13 Sept 2011, 15:09 last edited by
Thanks! So simple... I had tried
@inputMethodHints: Qt.ImhNoAutoUppercase & Qt.ImhNoPredictiveText@
which makes sense from a natural language point of view but, now I see, not from a computer language point of view. ;)
1/6