class MyWindow(QtGui.QMainWindow): def __init__(self): super(MyWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.my_button.clicked.connect(self.on_my_button_push) self.show() def on_my_button_push(self): self.ui.my_label.setText("Button pushed!")
def __init__(self): super(MyWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.my_button.clicked.connect(self.on_my_button_push) self.show()