[PyQt] multiple inheritance + QtCore.pyqtSignal()

Phil Thompson phil at riverbankcomputing.com
Tue Jul 13 09:30:33 BST 2010


On Mon, 12 Jul 2010 18:51:47 +0100, Jugdish <jugdizh at gmail.com> wrote:
> Is there any way to have a class inherit from multiple classes that emit
> signals? I know that PyQt4 doesn't support inheriting from one than one
> QObject class, so I've got one of the superclasses declared as a subclass
> QObject and the other as a subclass of object. However, I'm not able to
> define signals using QtCore.pyqtSignal() on a subclass of object. For
> example:
> 
> class A(QObject):
>     signalA = QtCore.pyqtSignal()
> 
> class B(object):
>     signalB = QtCore.pyqtSignal()
> 
> class C(A, B):
>     pass
> 
> Is there any way to do this?

No.

Phil


More information about the PyQt mailing list