have you tried this hint ? ( this worked for the spin box, I could use the 
hardware keyboard without pressing Fn )

Qt::ImhDigitsOnly

Qt::ImhFormattedNumbersOnly didnt work for me , for the spin box , I needed a 
dot (.) , since I was using a double spinbox. I'll be raising a bug for that, 
perhaps even the hint you are using below has similar issues.

WHen I spoke to some QT team members , what they told me was this should be 
done by default for some widgets, for example the spinbox there
shouldnt be a need to explicitly hint, it should be default, so it seems there 
could be issues to iron out here.

try using the above "working" hint and see how it goes.

-krk969


----- Original Message -----
From: Sudheer K.
Sent: 05/13/10 11:54 PM
To: rkma...@gmx.com, Maemo Dev Mailing List
Subject: RE: Qt question: How to automatically enable numeric input mode for a 
field?


-----------------------------------------------------------------
>Date: Fri, 14 May 2010 00:34:48 +0200
>From: rkma...@gmx.com
>Subject: RE: Qt question: How to automatically enable numeric input mode for a 
>field?
>To: scifi....@hotmail.com; maemo-developers@maemo.org
>
>hi sudheer, as far as I know this is what its actually supposed to do , else 
>it may be a bug.
>
>btw this works only in QT4.6.
> http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints 
> http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints 
> http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints 
>
>
>ive tried this in a spin box and it works.
>
>-
>krk969


Hi Ram,


Here is the code that I am using. The hint is working fine for virtual 
keyboard, but I am looking for a physical keyboard solution. The physical 
keyboard input mode should automatically change to numeric for this field. What 
am I missing here?

 lineEditCallingCardNumber = new QLineEdit(formLayoutWidget);
 
lineEditCallingCardNumber->setObjectName(QString::fromUtf8("lineEditCallingCardNumber"));
 lineEditCallingCardNumber->setInputMethodHints(Qt::ImhDialableCharactersOnly);

-----------------------------------------------------------------
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. 
Learn more. 
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to