so I'm writing a program in PyQt5 and making use of the QObject class. Here's the basic program.
class Object(QObject):
def __init__(self, parent=None):
super(Object, self).__init__(parent)
self.field = []
class Object2(Object):
def __init__(self):
super(Object, self).__init__()
self.field.append(1)
if __name__ == '__main__':
o = Object2()
But I'm getting this error:
AttributeError: 'Object2' object has no attribute 'field'
I can't seem to find the cause of problem. Is it that a python child class cannot access it's parents attributes?