Hi,

I've added an optional parameter in the the on_pushButton_clicked() SLOT. The related code:

Qt Code:
  1. private slots:
  2. void on_pushButton_clicked(bool isFree = false);
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void myClass::on_pushButton_clicked(bool isFree)
  2. {
  3. if (isFree)
  4. {
  5. // Do something
  6. }
  7. else
  8. {
  9. // Do something for not free
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 

The code works well but I get the next warning:

QMetaObject::connectSlotsByName: No matching signal for on_pushButton_clicked(bool)

Is it possible make some changes to avoid this warning?

Regards.