Results 1 to 2 of 2

Thread: Validate a value of lineEdit

  1. #1
    Join Date
    Aug 2009
    Posts
    3

    Default Validate a value of lineEdit

    hi...

    I've problems with validate some values of lineEdit.

    I was reading about one way to lineEdith only accept Strings or doubles or ints, but in the file .ui, like a "manual" form.

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Validate a value of lineEdit

    See QLineEdit::setValidator(...).
    You will need a QValidator object for this. Qt already provides validators for int, double and regular expressions. The regular expression has, of course, to be defined yourself.

Similar Threads

  1. How to update lineEdit
    By HelloDan in forum Qt Programming
    Replies: 9
    Last Post: 17th February 2009, 07:01
  2. Copy / Paste doesn't work with LineEdit
    By ia32 in forum Qt Tools
    Replies: 2
    Last Post: 5th May 2008, 21:44
  3. read and write content of lineedit widget in Other Form
    By validator in forum Qt Programming
    Replies: 1
    Last Post: 25th April 2008, 15:07
  4. Slots in LineEdit
    By Misko in forum Newbie
    Replies: 3
    Last Post: 28th July 2007, 13:36
  5. subclassing or redrawing a lineEdit
    By jayw710 in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 18:26

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.