[PyQt] New-style signal bug with QGraphicsItem
Phil Thompson
phil at riverbankcomputing.com
Sun Jun 7 11:16:31 BST 2009
On Sun, 07 Jun 2009 10:46:19 +0400, Alexey Nikitenko <non-alex at yandex.ru>
wrote:
> Hi!
> I found this:
> class GItem(QtGui.QGraphicsRectItem):
> event = QtCore.pyqtSignal()
> gitem = GItem()
> gitem.event.emit()
>
> throws TypeError: pyqtSignal must be bound to a QObject, not 'GItem'.
> Fresh PyQt 4.5 SIP 4.8, Python 2.5, mingw.
> Thanks.
That's not a bug. You can only define Qt signals for QObject sub-classes.
Phil
More information about the PyQt
mailing list