[Qt-interest] QIntValidator not working as expected

Aaron Lewis aaron.lewis1989 at gmail.com
Sat Sep 25 06:47:05 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/24/2010 07:50 PM, Pradeep K Vijayan wrote:
> Hi,
>
> 0 is allowed because appending few numbers after 0 makes the entry
> valid. For ex, 0001 is a valid number in your case. Empty text and
> 0 in your lineedit puts the validator in 'Intermediate' state.
>
> http://doc.trolltech.com/4.7/qintvalidator.html#validate

Thanks , so was there any hints for my need ?

>
> Regards, Pradeep K Vijayan
>
> On 24/09/2010 12:23, Aaron Lewis wrote:
>>
> Hi, Using an instance of QLineEdit as s3 , would range its value
> from 1 to 254 , thus
>
> ui->s3->setValidator(new QIntValidator(1,254,ui->s3));
>
> I could still type `000' inside the box , what could be wrong here
> ?
>
> Many thanks.
>

> _______________________________________________ Qt-interest mailing
> list Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkydfskACgkQvf41sEptMqAUPwCdFJb/MUMhpOB1rF5zaxpXoC6A
OfYAoJAgsoHq35DN8skNfUGxiAeQzoBv
=K6o/
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100925/53d930b9/attachment.html 


More information about the Qt-interest-old mailing list