QLineEdit.setValidator should accept None since, since the default value of QLineEdit.validator is None. Also mentioned here https://doc.qt.io/qt-5/qlineedit.html#setValidator "If v == 0, setValidator() removes the current input validator."