2011-04-14 65 views

回答

5
>>> from PyQt4 import QtCore 
>>> QtCore.QObject.__mro__ 
(<class 'PyQt4.QtCore.QObject'>, <type 'sip.wrapper'>, <type 'sip.simplewrapper'>, <type 'object'>) 

因此,答案是肯定的(至少QObject做,但我相信的QObject非后代做,太)。

+0

谢谢。我不知道'__mro__'。 – 2011-04-14 16:33:43

+2

你可以使用'issubclass(QtCore.QObject,object)',但用'__mro__'你可以一次获得所有的基类。 – 2011-04-14 17:37:40