Hello all,

I've encountered what I suspect is a Shiboken bug, which the following
script demonstrates. I am hardly a metaclass wizard, but I think this should
work (at any rate, it does under PyQt4). Strangely, creating a C does work,
but creating a D gives "RuntimeError: You can't initialize an object
twice!". Does anyone know what the problem is?

Thanks,
Evan

-------------------------------------------------
from PySide import QtGui

class MetaA(type):
    pass
class A(object):
    __metaclass__ = MetaA

MetaB = type(QtGui.QWidget)
B = QtGui.QWidget

class MetaC(MetaA, MetaB):
    pass
class C(A, B):
    __metaclass__ = MetaC

class D(C):
    pass

app = QtGui.QApplication([])
#w = C() # works
w = D() # broken
w.show()
app.exec_()
-------------------------------------------------
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to