How to reset the QValidator to accept all input once some Validator is used

556 Views Asked by At

I have used the setValidator(QIntValidator) in PyQt. How to reset this Validator to accept all the inputs like it was before ? I want to dynamically handle the validation thats why ...

1

There are 1 best solutions below

0
On BEST ANSWER

Due to Qt documentation:

If v == 0, setValidator() removes the current input validator

So, use setValidator(None).