Natesh bhat
Natesh bhat

Reputation: 13247

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

Upvotes: 1

Views: 640

Answers (1)

Nikolai Shalakin
Nikolai Shalakin

Reputation: 1484

Due to Qt documentation:

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

So, use setValidator(None).

Upvotes: 1

Related Questions