QDoubleValidator not working as expected on QLineEdit
General and Desktop
4
Posts
2
Posters
5.6k
Views
1
Watching
-
Hi All,
I have written the following code on QLineEdit.
QDoubleValidator *doubleVal = new QDoubleValidator( 0.0, 100.0, 2, this );
lineEdit->setValidator(doubleVal);In above code we have set the range from 0 to 100 so when we enter digit above 100 then lineEdit should not allow to enter the value above maximum range as it is right behaviour with the QIntValidator.
As what i believe is lineedit should not allow to enter the value more then maximum value. Can you please help ?
Above code allow to enter the value 999999 which is wrong. Help me.