pythonqtpyqtqvalidator

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


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 ...


Solution

  • Due to Qt documentation:

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

    So, use setValidator(None).