also dont use like this condition ..if (lineEdit_name->text() != " ") {
emit allfieldsfull();
}
use
QString text = lineEdit_name->text();
if (!text.isEmpty())
emit allfieldsfull();
"Behind every great fortune lies a crime" - Balzac
Is even more better because of avoiding a temporary variable. But nonetheless in that case a signal is not necessary, because you can simply call your member function.Qt Code:
if (!lineEdit_name->text().isEmpty()) emit allfieldsfull();To copy to clipboard, switch view to plain text mode
yes i know this is more simpler ... but for newbie i explained clearly that we check in QString function ..
if (!lineEdit_name->text().isEmpty())
and see i use "also" .. to tell him in future u use conditions like this in different application ..
here using textChanged() signal is the better one ... i agree ...
"Behind every great fortune lies a crime" - Balzac
Bookmarks