[PyQt] QValidator.validate encore

Phil Thompson phil at riverbankcomputing.com
Sat Sep 29 16:46:21 BST 2012


On Sat, 29 Sep 2012 08:24:13 -0700, David Cortesi <davecortesi at gmail.com>
wrote:
>>
>> The API is different for different versions of the QString API.
>> Phil
>>
> 
> Sorry, I'm using Python 2.7 and PyQt4 (4.8.3).
> 
> Looking around the Riverbank docs starting at the top level I find this
> link:
> 
> 
>
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/python_v3.html#qvalidator
> 
> which seems to imply that the validate() -> (State, QString, int) API is
> new for Python 3.
> 
> However I cannot find any other doc for QValidator except this link:
> 
> 
>
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvalidator.html
> 
> which also gives the ->(State, QString, int) return value.

...and also gives a ->(State, int) overload which is the QString v1 (ie.
Python2) version.

I agree that it is far from obvious.

Phil


More information about the PyQt mailing list