[Interest] Input Validator

Rainer Wiesenfarth Rainer_Wiesenfarth at trimble.com
Wed Sep 17 17:17:24 CEST 2014


Am 17.09.2014 17:11, schrieb Stephen King:
> I'm a little confused with QML  TextInput with an int validator in Qt
> 4.7.4 (and maybe later). Given an int validator with a top of 128 and
> bottom of -127, why is 07 acceptable but 08 not and likewise 028, 038
> etc? I assume they're actually intermediate but I don't think I can
> get that information from the QML.
> [...]

I'd assume that the zero at the left is interpreted as leading prefix 
for an octal number. That'll explain why 07 is accepted while 08 is not.

Just for curiosity: is 0xf accepted? :-)

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4255 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140917/3408a4dc/attachment.bin>


More information about the Interest mailing list