[maemo-developers] Qt question: How to automatically enable numeric input mode for a field?

From: Ram Kurvakat rkmaemo at gmx.com
Date: Fri May 14 01:34:48 EEST 2010
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 


ive tried this in a spin box and it works.

-
krk969




----- Original Message -----
From: Sudheer K.
Sent: 05/13/10 11:27 PM
To: rkmaemo at 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:15:25 +0200
>From: rkmaemo at gmx.com
>Subject: Re: Qt question: How to automatically enable numeric input mode for a field?
>To: scifi.guy at hotmail.com; maemo-developers at maemo.org
>
>I dont know whats wrong with my mail client now, a control C just sends the message
>so sorry my previous message(s) were sent before I finished typing...
>
>anyways
>
>use input method hints..
>http://doc.trolltech.com/4.6/qt.html#InputMethodHint-enum
>
>something like this
>
>linedit->setInputMethodHints(Qt::ImhDigitsOnly);

>
>-
>krk969
Sorry, bad day for emailing. I am resending the mail with mailing list address included.

Actually I tried setInputMethodHints(Qt::ImhDigitsOnly). The problem with this hint is that when I enter the field for editing, my (hardware) keyboard will always be in text mode and the field does not accept any alpha-characters. I need to lock the Fn key manually to be able to enter the numbers.

I want to make it more user-friendly and enable the number mode automatically when the cursor/focus is in this field. This way user doesn't have double-press/lock the Fn key before entering numbers in this field. How can I do it in Maemo/N900?
-----------------------------------------------------------------
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20100514/b445704c/attachment.htm>
More information about the maemo-developers mailing list