Results 1 to 2 of 2

Thread: How to create a validator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    34
    Qt products
    Qt4
    Platforms
    Windows

    Default How to create a validator

    Hi,

    I don't know how a validator works and I have to add one some complex :S:

    +/-xxx.xx, +/-xxx.xx, +/-xxx.xx where x are numbers.


    Besides the official documentation is there something usefull?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to create a validator

    Well I would say that that is an easy one Have a look at QRegExpValidator and use a regular expression on testing the string. The documentation is good on how reg exp works but if not, you will find a lot of stuff in the net.

Similar Threads

  1. Disable QDoubleSpinBox validator
    By daleotar in forum Qt Programming
    Replies: 1
    Last Post: 20th June 2011, 20:29
  2. Validator
    By tinysoft in forum Newbie
    Replies: 5
    Last Post: 13th April 2011, 16:00
  3. Validator for QDoubleSpinBox
    By ehamberg in forum Qt Programming
    Replies: 3
    Last Post: 15th March 2008, 11:37
  4. QRegExp validator
    By mattia in forum Newbie
    Replies: 2
    Last Post: 28th November 2007, 08:15
  5. what's wrong with my validator?
    By TheKedge in forum Qt Programming
    Replies: 5
    Last Post: 26th January 2006, 21:41

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
  •  
Qt is a trademark of The Qt Company.