Qt类继承关系

print(QObject.__subclasses__())
def getSubClasses(cls):
    for subcls in cls.__subclasses__():
        print(cls, subcls)
        if len(subcls.__subclasses__())>0:
            getSubClasses(subcls)

def getSupClasses(cls):
    mros = cls.mro()
    for mro in mros:
        print(mro)

你可能感兴趣的:(Qt类继承关系)