вот часть кода
class Ui_Search(object): def setupUi2(sear, Searcher): Searcher.setWindowTitle(_translate("MyForm", "Form", None)) Searcher.resize(400, 300) sear.button=QtGui.QPushButton(Searcher) sear.button.setText(_translate("MyForm", "OK", None)) sear.button.move(20,10) sear.label1=QtGui.QLineEdit(Searcher) sear.label1.setGeometry(QtCore.QRect(20, 35, 350, 25)) sear.button.clicked.connect(sear.label1.text) sear.label1.text() sear.label1.setText("") sear.connect(sear.label1, QtCore.SIGNAL('textChanged()'), sear.button)