<div dir="ltr">Hi Phil,<div><br></div><div>When implementing my own subclass of QValidator, I get a "TypeError: invalid result from Validator.validate()" error followed by a segfault on macOS for the following code:</div><div><br></div><div>Example:</div><div><br></div><div><br></div><div>from PyQt6 import QtCore, QtGui, QtWidgets<br>import sys<br><br>class Validator(QtGui.QValidator):<br><br>    def validate(self, index_, pos):<br>        return QtGui.QValidator.State.Acceptable<br><br>if __name__ == "__main__":<br>    qApp = QtWidgets.QApplication(sys.argv)<br><br>    lineEdit = QtWidgets.QLineEdit()<br>    validator = Validator()<br>    lineEdit.setValidator(validator)<br>    lineEdit.show()<br>    qApp.exec()<br></div><div><br></div><div>Running this file generates a QLineEdit, but the moment you edit the contents and have the widget lose focus the following error is emitted:</div><div><br></div><div>TypeError: invalid result from Validator.validate()<br>zsh: abort      python problem.py</div></div>