On 03/19/10 18:45, Demetrius Cassidy wrote: > > I am not sure if this is the intended behavior, but if I subclass a QWidget > instance, and then try to connect to one of those signals in my subclass, I > get a TypeError: > >>>> class MyLabel(QtGui.QLabel): > ... def __init__(self): > ... self.linkActivated.connect(self._lnkActivated) > ... > ... def _lnkActivated(self, link): > ... pass > ... >>>> l = MyLabel() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "<stdin>", line 3, in __init__ > TypeError: pyqtSignal must be bound to a QObject, not 'MyLabel' >>>> > > Why can't I connect to my base class's signals in my subclass?
You need to call the parent's init. super(QtGui.QLabel, self).__init__() _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt