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. State of QSignalMapper
Qt 6.11 is out! See what's new in the release blog

State of QSignalMapper

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 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
    milgner
    wrote on last edited by
    #1

    Hi all,

    while investigating the possibility to enhance QSignalMapper with support for QVariant mapping, I came across this ticket: https://bugreports.qt-project.org/browse/QTBUG-4035

    Unfortunately, I cannot quite concur with the conclusion that QSignalMapper has become useless with the introduction of lambdas. There are still scenarios - for example when working with plugins - where one doesn't have access to the class method address --and thus needs to rely on the const char* notation derived from the SIGNAL() macro, rendering the connect() signature using a lambda unavailable.
    Additionally, although I'm a big fan of lambdas myself, I expect that some teams doing cross-platform development may be reluctant to adopt to C++11 usage for some time.
    Having said that, I'd be willing to create a patch and pull request for QSignalMapper to support QVariant, but that wouldn't make sense if you decide to deprecate it, in which case I'd do the mapping locally.

    All the best
    Marcus

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

      Hi,

      I think you have a valid point. If you have a solution for that feature request, you should go ahead and make the patch (start by Qt 5 then cherry-pick for Qt 4).

      Nobody said QSignalMapper will be deprecated

      Happy coding !

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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