Answer the question
In order to leave comments, you need to log in
How to write text from QLineEdit to pyqt4 variable?
It does not work out to write the text from QLineEdit to the variable and associate the saving with the button click.
here is part of the code
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)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question