[PyKDE] Passing the equivalent of NULL

Phil Thompson phil at riverbankcomputing.co.uk
Sat Sep 6 11:59:01 BST 2003


On Tuesday 02 September 2003 2:40 am, Derek Fountain wrote:
> I'm told on the Qt list that:
>
> myLabel->setPixmap(NULL);
>
> sets a label's pixmap to nothing without giving a warning message.
>
> How do I do that from PyQt? I tried:
>
> pixmapLabel.setPixmap( QPixmap() )
>
> which does give an empty pixmap, byt also prints a warning. Using "None"
> gave a runtime error, as did 0.

Use None. If you have a runtime error then there is another problem.

Phil




More information about the PyQt mailing list