How to implement such functionality that a button is enabled only if two lineEdit’s are filled with text?
How to implement such functionality that a button is enabled only if two lineEdit’s
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want to monitor both line edits for changes:
And then you need to enable/disable the button when text is present in both:
If you only care about user edits, you can use the textEdited(const QString&) signal instead of the textChanged signal.