
Originally Posted by
:db:sStrong
i use regular expression but it is not doing what i want. I want to type the integers bigger than 2 and smaller than 16000, if i am not able to write 1 and 2 how can i type 11 and 12?
How about using QIntValidator?
Besides, you can do it with regular expressions as well, something like this should work:
QRegExp("([3-9][0-9]{0,3})|(2[0-9]{1,3})|(1(([0-6][0-9]{0,3})|([7-9][0-9]{0-2})))");
QRegExp("([3-9][0-9]{0,3})|(2[0-9]{1,3})|(1(([0-6][0-9]{0,3})|([7-9][0-9]{0-2})))");
To copy to clipboard, switch view to plain text mode
Bookmarks