use*_*782 5 pyqt line android-edittext
我需要检查 PyQt4 中 lineEdit 的值是否已更改,如果此值已更改,我需要触发一个插槽。我的代码:
self.connect(self.ui.lineEdit, QtCore.SIGNAL("textChanged (QString & text"), self.sync_lineEdit)
Run Code Online (Sandbox Code Playgroud)
如果我更改 GUI 中的值,则不会发生任何事情。知道如何解决这个问题吗?
亲切的问候;
尝试简单连接:
self.ui.lineEdit.textChanged.connect(self.sync_lineEdit)
...
def sync_lineEdit(self, text):
print text
Run Code Online (Sandbox Code Playgroud)
这应该可以正常工作