2009/1/31, Filip Gruszczyński <grusz...@gmail.com>: > Could someone explain to me, how is that possible and why it works: > > class A(QWidget): > def __init__(self): > QWidget.__init__(self) > > class B(QWidget): > def __init__(self): > QWidget.__init__(self) > > class C(A, B): > def __init__(self): > A.__init__(self) > B.__init__(self) > > I mean, it's cool, that it works - I just used and I love it. But > having just C(QWidget, QWidget) won't work. Why above example does?
I think it works because A and B are two different and separated instances of the same object (QWidget) while QWidget is the same class. Try to substitute QWidget with the python standard 'object' class and you have the same behaviour and this error: 'duplicate base class object' HTH, Simone _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt