For example
class A : public QObject
{
Q_OBJECT
public:
void f(int);
void f();
};
A a;
QAction action(0);
connect(&action, &QAction::triggered, &a, &A::f); // error because 2 f functions.
How to overcome it besides renaming one of the 2 overloaded functions? Thanks.
QT5 still supports the “old” way of connecting using complete prototypes:
or
EDIT: using the new way can be done with a cast (have not tried it myself):