there are two types of signal/slot connection semantics in Qt:
connect(sender, SIGNAL(mySignal()), receiver, SLOT(mySlot())); // 1
connect(sender, &MySender::mySignal, receiver, &MyReceiver::mySlot); // 2
2
is usually preferable and supports connections to lambda functions. When object type is not defined at compile-time, 1
is the only option. Working with QtQuick objects from c++ is exactly this case.
Is there a way to connect signal by name to lambda function? Something like
connect(sender, SIGNAL(mySignal()), receiver, [] { ... });