The QLineEdit::setValidator can't stop QIntValidator Top Value when user input?
Solved
General and Desktop
-
This is my code below.
mValidator = new QIntValidator(0, 500, ui->lineEdit); mValidator->setRange(0, 500); ui->lineEdit->setValidator(mValidator);
It works fine on Qt5.9.5. if user want to input "600", after user insert "60", the QLineEdit will stop user input continue.
But this code will not work on Qt5.12.3, user can input the "999" in that QLineEdit.
Is there a simple way to make Qt5.12.3 works same as Qt5.9.5?
-