On Wed, 30 Sep 2009 17:43:03 -0700 (PDT), Jason H <[email protected]> wrote: > I am working on a hacked PyQt to play with the new animation features. So > this isn't entirely kosher, however. > > I have the following: > class AffineItem(QGraphicsItem): > def __init__(self, ..., parent): > QGraphicsItem.__init__(self, parent) > > class WrappedAffineItem(QObject, AffineItem): > def __init__(self ...): > QObject.__init__(self) > AffineItem.__init__(self, ..., parent) > > The WrappedAffineItem needs to declare properties, so I have to inherit > QObject. > Here is the traceback of what I am getting: > > Traceback (most recent call last): > i = WrappedAffineTextItem(text, ..., self.items['clipItem']) > File "C:\Qt\PyQt-win-gpl-4.5.2\Plaza.py" in __init__ > AffineTextItem.__init__(self, '', font, brush, parent) > File "C:\Qt\PyQt-win-gpl-4.5.2\Plaza.py", line 8, in __init__ > QGraphicsItem.__init__(self, parent) > TypeError: argument 1 of PyQt4.QtCore.QObject() has an invalid type > > Help? > Thanks!
You can't multiply inherit from 2 C++ classes. Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
