[PyKDE] None as a string argument

Phil Thompson phil at riverbankcomputing.co.uk
Tue Sep 20 22:20:56 BST 2005

On Tuesday 20 September 2005 10:09 pm, Anthony Heading wrote:
> Hi,
> The latest pyqt (3.15) with sip 4.3.1 seems to disallow None to be passed
> into any Qt function expecting a QString.  For example, adding a line
> to tut1.py:
>     button.setText(None)
> produced a blank button in earlier pyqt releases, but now gives an error:
>     Runtime Error: cannot pass None as argument 0 in this call
> Is this an intended change?

Yes it is (although it seems I haven't documented it very well - it was 
discussed on the mailing list). The old behaviour was inconsistent.

> (Also, the 0-based error message is intentional, or off-by-one?)

I count from 0.


More information about the PyQt mailing list