Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyqt check if value of lineEdit changed

I Need to check if the value of a lineEdit in PyQt4 changed, if this value is changed I Need to Trigger a Slot. My code:

self.connect(self.ui.lineEdit, QtCore.SIGNAL("textChanged (QString & text"), self.sync_lineEdit)

Nothing happend if I Change the value in the GUI. Any idea how to fix this Problem?

Kind regards;

like image 925
user3551782 Avatar asked Apr 26 '14 17:04

user3551782


1 Answers

Try simple connect:

self.ui.lineEdit.textChanged.connect(self.sync_lineEdit)
...

def sync_lineEdit(self, text):
    print text

This should work fine

like image 109
qurban Avatar answered Sep 24 '22 19:09

qurban