Hi there folks,

I wrote a piece of code that is supposed to put a button enabled (previously grayed out)

declaration:

Qt Code:
  1. public slots:
  2. void allowinput();
  3. signals:
  4. void allfieldsfull();
To copy to clipboard, switch view to plain text mode 

implementation:

Qt Code:
  1. adddialog::adddialog() {
  2. setupUi(this);
  3. connect (this, SIGNAL (allfieldsfull()), this, SLOT (allowinput()));
  4. connect (pushButton_Cancel, SIGNAL (clicked()), this, SLOT (close()));
  5. if (lineEdit_name->text() != " ") {
  6. emit allfieldsfull();
  7. }
  8. }
  9.  
  10. void adddialog::allowinput() {
  11. pushButton_ok->setEnabled(true);
  12. }
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,