Have a look at the declaration of the static
connect
function:
connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type = Qt::AutoConnection)
You have to pass pointers for the sender and receiver
QObject
but you are passing by reference:
A a;
Handler h;
QObject::connect(a, SIGNAL(wasSet(B*)), h, SLOT(handle(B*)));
Solution:
QObject::connect(&a, SIGNAL(wasSet(B*)), &h, SLOT(handle(B*)));