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. [Solved] single signal to multiple slots
Forum Update on Monday, May 27th 2025

[Solved] single signal to multiple slots

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 12.1k Views
  • 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
    mititelud
    wrote on last edited by
    #1

    hello,

    How many slots can you connect to a signal?

    :)

    1 Reply Last reply
    1
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      It's unlimited, It's just a event queue handled by the QApplication

      Greetz, Jeroen

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mititelud
        wrote on last edited by
        #3

        but...how?
        i only know how to use the connect function.

        @
        QObject::connect(&aObject, SIGNAL(ValueChanged(int)),
        &bObject, SLOT(setValue(int)));
        @

        :)

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

          Hi,

          And that's right function. You can connect the same signal to as many objects as you want, you just need to write all the connect statement OR if the multiple targets are of the same class use a loop to do the connection.

          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
          1
          • M Offline
            M Offline
            mititelud
            wrote on last edited by
            #5

            i messed up some parameters.
            thread is solved.
            :D

            :)

            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