PDA

View Full Version : Help on inputMask



vieraci
25th July 2007, 12:45
I notice the insert key does nothing at runtime for an entry field with an inputMask It's always in overwrite mode. Is this normal ?

jpn
25th July 2007, 21:42
Yes, that's normal. Use validators (http://doc.trolltech.com/4.3/qlineedit.html#setValidator) for validating the input in a different way than the input mask does.

vieraci
26th July 2007, 10:13
Validators don't Format.
What I want to do is make it more foolproof for users to input data, like capitalize the first character, format phone numbers etc. I wrote some custom formatting and validating classes for Visualage C++, I think I'll have to port the formatting parts to Qt.

jpn
26th July 2007, 11:57
Validators don't Format.
Actually, validators can do some little "formatting" too. See QValidator::fixup().

vieraci
26th July 2007, 12:30
After I deleted the inputMask the insert key STILL does nothing.
and this is normal ??

jpn
26th July 2007, 13:54
Oh, indeed. Seems QLineEdit doesn't have that kind of functionality. I'm Sorry if I mislead you.

vieraci
26th July 2007, 14:43
Porting my old code is looking like the way to go then. I don't want to, but...