[PyQt] Correct return type from QValidator.validate()?

David Cortesi davecortesi at gmail.com
Fri Sep 28 23:50:12 BST 2012


Hello, I am trying to set up a QValidator on a QLineEdit. The Assistant
says that the validate() member should return something from the Enum
QValidator::State. My validator's validate() member currently has only the
one statement,

   return QValidator.Acceptable

Whenever an edit is made in the LineEdit, the error appears:

  TypeError: invalid result type from findRepValidator.validate()

What is the correct type of return, if not the enum, or am I coding it
wrong?

Thanks for your attention,

Dave Cortesi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120928/c5fa0fc3/attachment.html>


More information about the PyQt mailing list