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? 
-- 
View this message in context: 
http://old.nabble.com/Connecting-to-base-class-signals-in-subclass-tp27951038p27951038.html
Sent from the PyQt mailing list archive at Nabble.com.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to