Hi there folks,
I wrote a piece of code that is supposed to put a button enabled (previously grayed out)
declaration:
public slots:
void allowinput();
signals:
void allfieldsfull();
public slots:
void allowinput();
signals:
void allfieldsfull();
To copy to clipboard, switch view to plain text mode
implementation:
adddialog::adddialog() {
setupUi(this);
connect (this, SIGNAL (allfieldsfull()), this, SLOT (allowinput()));
connect (pushButton_Cancel, SIGNAL (clicked()), this, SLOT (close()));
if (lineEdit_name->text() != " ") {
emit allfieldsfull();
}
}
void adddialog::allowinput() {
pushButton_ok->setEnabled(true);
}
adddialog::adddialog() {
setupUi(this);
connect (this, SIGNAL (allfieldsfull()), this, SLOT (allowinput()));
connect (pushButton_Cancel, SIGNAL (clicked()), this, SLOT (close()));
if (lineEdit_name->text() != " ") {
emit allfieldsfull();
}
}
void adddialog::allowinput() {
pushButton_ok->setEnabled(true);
}
To copy to clipboard, switch view to plain text mode
the problem is: it's not working!
any solutions? code samples would be very much appreciated.
Thanks in advance,
Bookmarks