PDA

View Full Version : Problem with mask and validation



gunhelstr
19th April 2006, 07:35
This code-excample does not work in Qt 3.2.0

QLineEdit* le = new QLineEdit( myGroupBox, "le" );

/*
.
.
setting sizepolizy, size and cursor
.
.
*/

myLayout->addWidget( le, 1, 6 );

le->setInputMask("999.99");
le->setValidator(new QDoubleValidator(0.00,100.00,2, le));

After this inittialization the lineEdit does not take any input at all.
It is not readonly, and it is enabled.

(I have tried a number of different variations I could think of.)

What could the reason be?

wysota
19th April 2006, 08:07
Get rid of the input mask. It's not needed if you have a validator set.