[Solved] QT Programme Error: error: no matching function for call to…

The following error occurred in the binding mechanism between signal and slot function:

error: no matching function for call to 'Widget::connect(QPushButton*&, void (QAbstractButton::*)(bool), Widget*, <unresolved overloaded function type>)'

The reason for the error is that when making a response call, you do not know which function to call, indicating that function reuse occurs.

void classover();
void classover(QString food);

For the above two functions, you can mask one. Which one?

When signals correspond to slot functions, two characteristics need to be noted:
1. The parameter types of signals and slots must correspond one by one
2. The number of parameters of signals and slots can be different, but the number of signal parameters must be more than that of slot functions

To sum up, the nonparametric function is retained to achieve the correct result.

Read More: