1
我想爲接口創建抽象基類,但我需要它從QObject派生出信號和插槽。我的類定義是這樣的:如何在從QObject派生的python中創建抽象基類
import abc
from PyQt5.QtCore import QObject
class interface_class(abc.ABC, QObject):
pass
它失敗:
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
任何想法?
感謝