我想实现一个抽象类,它是QLabel的子类。
代码是:
from PyQt5.QtWidgets import *
from abc import ABCMeta
class myLabel(QLabel, metaclass=ABCMeta):
pass
a = myLabel()
发生错误:
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases