class testWidget(QtGui.QWidget):
def __init__(self, parent=None):
super(testWidget, self).__init__(parent)
self.parent = parent
self.something()
def something(self):
self.parent.callme() # self.parent?.... nice?
class testClass():
def __init__(self):
self.widget = testWidget(parent=self)
test = testClass()
What is the cleanest way of dealing with a parent class in python(pyqt)? Is there a nicer way than calling self.parent directly?