Issue
I've got a QLineEdit field and a QPushButton. The button should be disabled as long the QLineEdit is empty.
How to do that?
Solution
well, i'll just conclude what they said in the comments, some code like
self.btnButton.setDisable(True)
self.leInput.textChanged.connect(self.disableButton)
def disableButton(self):
if len(self.leInput.text()) > 0:
self.btnButton.setDisable(False)
and yes, the signals / function names are obvious, you need to check more on the docs / tutor
Answered By - Jack Wu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.