Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Lambdas in QDBusConnection::connect
Forum Updated to NodeBB v4.3 + New Features

Lambdas in QDBusConnection::connect

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 749 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikheyevav
    wrote on last edited by mikheyevav
    #1

    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?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      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.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved