I am trying to create an AbstractClass using both abc.ABCMeta and QObject as parents and cannot seems to make it work.
Here is the Base class init. I have Pyqt5 and
I solved it using this approach instead:
class ParamsHandler_Meta(type(QObject), type(abc.ABCMeta)):
pass
class ParamsHandlerClass(QObject):
pass
class ParamsHandler(ParamsHandlerClass):
__metaclass__ = ParamsHandler_Meta
def __init__(self, device_model, cmd_to_get_data, read_only=False):
super(ParamsHandler, self).__init__()
self.cmd_to_get_data = cmd_to_get_data
abc.ABCMeta
is supposed to be used as a metaclass. So instead of extending it, try:
class ParamsHandler(pyqtWrapperType):
__metaclass__ = abc.ABCMeta