Results 1 to 2 of 2

Thread: QLineEdit

  1. #1
    Join Date
    Feb 2008
    Posts
    47
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post QLineEdit

    hi,
    I want my Qlinedit to take only numbers as input.If i try to enter special characters or alphabets the it shouldnt take it and should be blank if i try doing that.

    How to do this???

    Can this be done in designer or should i code.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QLineEdit

    Quote Originally Posted by sonuani View Post
    I want my Qlinedit to take only numbers as input.If i try to enter special characters or alphabets the it shouldnt take it and should be blank if i try doing that.

    How to do this???

    Can this be done in designer or should i code.
    You can set an input mask in designer or validator in code.
    J-P Nurmi

Similar Threads

  1. QLineEdit and focus
    By serega in forum Qt Programming
    Replies: 1
    Last Post: 16th January 2008, 01:49
  2. how to get last character of QLineEdit
    By yagabey in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2008, 17:38
  3. Problem Euro Sign with QLineEdit
    By Kubil in forum Qt Programming
    Replies: 1
    Last Post: 24th August 2007, 05:56
  4. QValidator, regular expressions and QLineEdit
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 8th August 2007, 02:25
  5. a box around QLineEdit?
    By GreyGeek in forum Qt Tools
    Replies: 13
    Last Post: 8th February 2006, 16:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.