Important: Please read the Qt Code of Conduct -

Lambdas in QDBusConnection::connect

  • I've really liked the new connect syntax and possibility to use lambdas as listed below:

    connect(sender, &Sender::valueChanged, [=](const QString &newValue) {
      receiver->updateValue("senderValue", newValue);

    Is it possible to use lambda functions in the same way as slots for remote signals for QDBus?

  • Lifetime Qt Champion

    I dont know QDBus but since the connects it has -
    All seems to use const char * for the SLOT part and not
    a function member pointer, i lean towards No, u cant.
    Unless i miss a overloaded function, it seems not directly possible.

Log in to reply