[PyKDE] None as emit argument

Derek Fountain derekfountain at yahoo.co.uk
Sun Sep 28 04:06:03 BST 2003

I have this line of code:

self.emit( PYSIGNAL("signalNewViewerImage"), (QPixmap(filename),) )

It's possible for the filename, and hence the pixmap, to be None. The slot 
handles this eventuality. However, when I run the code under these 
circumstances, I get:

  File "./view/PublishImageView.py", line 47, in slotShowImage
    (self.queryCurrentFilename(),) )
  File "./model/PublishImageModel.py", line 33, in slotGenerateImage
    self.emit( PYSIGNAL("signalNewViewerImage"), (QPixmap(filename),) )
  File "/usr/lib/python2.2/site-packages/qt.py", line 43, in __init__
RuntimeError: Cannot pass None as argument 0 in this call

which seems self explanatory, although a bit odd. Is it not possible to pass 
None as a parameter through the signal emitting system, or have I done 
something wrong?

> eatapple
core dump

More information about the PyQt mailing list