class MyForm(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_Form() self.ui.setupUi(self) self.ui.pushButton.clicked.connect(self.writetext) def writetext(self): self.ui.label.setText(self.ui.lineEdit.text()) print "Hello World"
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_Form() self.ui.setupUi(self) self.ui.pushButton.clicked.connect(self.writetext)