On Thu, 29 Mar 2012 13:44:06 +0200, Kermit <stef.ker...@gmail.com> wrote:
> Hi PyQt community,
> 
> i can't understand why staticMetaObject isn't know in __new__
construction

A sip type isn't completely ready until the meta-type's __init__ method
has run. Therefore if you want to look at staticMetaObject before an
instance of the type is created then reimplement __init__ rather than
__new__.

class MetaKlass(QtCore.pyqtWrapperType):
    def __init__(self, name, bases, d):
        QtCore.pyqtWrapperType.__init__(self, name, bases, d)

        meta = self.staticMetaObject

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to