2011-04-14 70 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