<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title></title><meta http-equiv="Content-type" content="text/html; charset=UTF-8" /><style type="text/css">p { margin:0px; padding:0px; }</style></head><body style='background-color:rgb(255, 255, 255);background-image:none;background-repeat:repeat;background-position:0% 0%;font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px;margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;padding-top:5px;padding-bottom:5px;padding-left:5px;padding-right:5px;'><p><span style="font-family:Verdana;"><font id="mc_first" size="2">have you tried this hint  ? ( this worked for the spin box, I could use the hardware keyboard without pressing Fn )</font></span></p><p><span class="Apple-style-span" style="font-family:monospace;font-size:medium;border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;"><br /></span></p><p><span class="Apple-style-span" style="font-family:monospace;font-size:medium;border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;">Qt::ImhDigitsOnly</span></p><p><span style="font-family:Verdana;"><font id="mc_first" size="2"><span class="Apple-style-span" style="font-family:monospace;font-size:medium;border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;"><br /></span></font></span></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;">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.</span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;"><br /></span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;">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</span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;">shouldnt be a need to explicitly hint, it should be default, so it seems there could be issues to iron out here.</span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;"><br /></span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;">try using the above &quot;working&quot; hint and see how it goes.</span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;"><br /></span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;">-krk969</span></font></p><p><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;font-size:medium;"><br /></span></font></p><p><span style="font-family:Verdana;"><font id="mc_first" size="2"><span class="Apple-style-span" style="font-family:monospace;font-size:medium;border-collapse:collapse;-webkit-border-horizontal-spacing:1px;-webkit-border-vertical-spacing:1px;"><br /></span></font></span></p><font id="mc_first" size="2"><p></p><blockquote class="quote" face="Verdana" type="cite" style="font-size:12px;"><p>----- Original Message -----</p><p>From: Sudheer K.</p><p>Sent: 05/13/10 11:54 PM</p><p>To: rkmaemo@gmx.com, Maemo Dev Mailing List</p><p>Subject: RE: Qt question: How to automatically enable numeric input mode for   a         field?</p><br /><div> <br /><br /><hr id="stopSpelling" />&gt;Date: Fri, 14 May 2010 00:34:48 +0200<br />&gt;From: <a href="#" onclick="parent.mailclient.util.HelperUtil.executeClientFunction('openNewMail','rkmaemo@gmx.com');">rkmaemo@gmx.com</a><br />&gt;Subject: RE: Qt question: How to automatically enable numeric input mode for  a         field?<br />&gt;To: <a href="#" onclick="parent.mailclient.util.HelperUtil.executeClientFunction('openNewMail','scifi.guy@hotmail.com');">scifi.guy@hotmail.com</a>; <a href="#" onclick="parent.mailclient.util.HelperUtil.executeClientFunction('openNewMail','maemo-developers@maemo.org');">maemo-developers@maemo.org</a><br />&gt;<br /> <style> .ExternalClass p {padding:0px;} </style>&gt;<span class="ecxApple-style-span" style="font-size:small;">hi sudheer, as far as I know this is what its actually supposed to do , else it may be a bug.</span><br />&gt;<br />&gt;<span class="ecxApple-style-span" style="font-size:small;">btw this works only in QT4.6.</span><br /><a href="http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints" target="_blank">&gt;</a><span class="ecxApple-style-span" style="font-size:small;"><a href="http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints" target="_blank">http://doc.trolltech.com/qt-maemo-4.6/qgraphicsitem.html#inputMethodHints</a></span><br />&gt;<br />&gt;<br />&gt;ive tried this in a spin box and it works.<br />&gt;<br />&gt;-<br />&gt;krk969<br /><br /><br />Hi Ram,<br /><br /><br />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?<br /><br />        lineEditCallingCardNumber = new QLineEdit(formLayoutWidget);<br />        lineEditCallingCardNumber-&gt;setObjectName(QString::fromUtf8(&quot;lineEditCallingCardNumber&quot;));<br />        lineEditCallingCardNumber-&gt;setInputMethodHints(Qt::ImhDialableCharactersOnly);<br /><br /><hr />Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. <a href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1" target="_blank">Learn more.</a> </div></blockquote><p></p><br /></font><p></p><p> </p><div id="editor_signature"><p size="2" style="font-family:Verdana;"> </p></div></body></html>