void (QSqlDriver::*my_notification)(const QString &name) = &QSqlDriver::notification; // №1 QObject::connect(db.driver(), my_notification, [=](const QString &name) { qDebug() << name; });
C++ (Qt)QObject::connect(db.driver(), static_cast<void(QSqlDriver::*)(const QString&)>(&QSqlDriver::notification), [...] (...) { ... });