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. Determine whether a slot method registered at some QObject

Determine whether a slot method registered at some QObject

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 908 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.
  • R Offline
    R Offline
    RedSoft
    wrote on last edited by
    #1

    I am wondering whether Qt gives a way to determine that some Object has registered slot method with known name?

    kshegunovK 1 Reply Last reply
    0
    • R RedSoft

      I am wondering whether Qt gives a way to determine that some Object has registered slot method with known name?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      Look here.

      Read and abide by the Qt Code of Conduct

      R 2 Replies Last reply
      4
      • kshegunovK kshegunov

        Look here.

        R Offline
        R Offline
        RedSoft
        wrote on last edited by
        #3

        @kshegunov Many thanks

        aha_1980A 1 Reply Last reply
        0
        • R RedSoft

          @kshegunov Many thanks

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @RedSoft So please mark this topic as SOLVED. Thanks!

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • kshegunovK kshegunov

            Look here.

            R Offline
            R Offline
            RedSoft
            wrote on last edited by
            #5

            @kshegunov Am I correct concluding that using methods like QMetaObject::indexOfSlot is possible only when slot is registered by means of SLOT macro + subsequent MOCing and cannot be used with slot pointers?

            kshegunovK 1 Reply Last reply
            0
            • R RedSoft

              @kshegunov Am I correct concluding that using methods like QMetaObject::indexOfSlot is possible only when slot is registered by means of SLOT macro + subsequent MOCing and cannot be used with slot pointers?

              kshegunovK Offline
              kshegunovK Offline
              kshegunov
              Moderators
              wrote on last edited by
              #6

              Yes, because function pointers are function pointers, there's no "slot function pointer" that's different than any other method pointer. In fact you can use the pointer-to-member syntax even with methods that are not declared as slots.

              Read and abide by the Qt Code of Conduct

              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