[PyQt] QValidator.validate() returns TypeError: invalid result type

Eric Frederich eric.frederich at gmail.com
Sun Aug 15 01:16:30 BST 2010


Whoops, didn't realize I took this conversation off the mailing list.

So, does this mean it is not possible then to have a validator in Python2
fix the string?

On Sat, Aug 14, 2010 at 7:12 AM, Phil Thompson
<phil at riverbankcomputing.com>wrote:

> On Fri, 6 Aug 2010 14:57:45 -0400, Eric Frederich
> <eric.frederich at gmail.com> wrote:
> > The help only lists the (QVlidator.State, int)... it does not list the
> one
> > that returns a new string.
> > Does this mean it is not possible?
> >
> > I get the same docstring for QValidator.validate when I call
> > sip.setapi('QString', 1) or sip.setapi('QString', 2)
> >
> > This is what I get....
> >
> > Help on built-in function validate:
> >
> > validate(...)
> >     QValidator.validate(QString, int) -> (QValidator.State, int)
>
> The docstring doesn't get changed when you set the API version. It is
> correct for the default API for the particular version of Python you are
> using (v1 for Python2 and v2 for Python3).
>
> Phil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100814/6f54c87d/attachment-0001.html>


More information about the PyQt mailing list