×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Force QLineEdit in phone number mode only

    Hello,

    I would like to display a input text widget which accepts only numbers and the p,w,+,* characters to enter phone numbers only. I try the QLineEdit with setInputMask(QString::fromAscii("#")).

    The problem is that when the line edit has focus and displays the blinking cursor, it is first in "abc" mode (i.e. multitap mode). So I can enter a letter, which is then deleted because it is not a number.

    Is there a way to force the line edit in "123" mode? I mean how can I switch the FEP automatically in "123" when entering in the line edit?

    Bye.

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Re: Force QLineEdit in phone number mode only

    Hi again,

    I finally find the way to set the input mode:

    Code:
    QWidget::setInputMethodHints(Qt::ImhDialableCharactersOnly);

Similar Threads

  1. Dialling a phone number from J2ME midlet
    By anand_amarsh in forum Mobile Java General
    Replies: 3
    Last Post: 2008-08-04, 12:45
  2. intercept sms with phone number
    By zesky in forum Symbian
    Replies: 5
    Last Post: 2008-04-03, 13:43
  3. Can't save cell phone number of contact.
    By daveice in forum Symbian
    Replies: 1
    Last Post: 2008-03-27, 02:14
  4. HELP - RCall - Dial voice number crash
    By cmryan in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-02-13, 14:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×