On en.so came across the ability to turn off the signal from the lambda in this way:
QMetaObject::Connection *conn = new QMetaObject::Connection(); QSharedPointer<QMetaObject::Connection> pconn(conn); (*pconn) = QObject::connect(my_obj, &MyClass::mySignal, [this,pconn]() { QObject::disconnect(*pconn); }); Is there a memory leak and how else is it possible to perform the indicated operation?