How to know the slot connected to specific qobject&signal?
-
Is it possible, given an object derived from qobject and a specific signal, to dynamically know the slot connected to that signal? How?!?
-
-easiest way would be to have a look at the documentation of "QObject::connect(..)":http://qt-project.org/doc/qt-4.8/qobject.html#connect and to see there that connect() returns a boolean value.-
Sorry misread your question
-
No problem :)
This explanation maybe will help you to understand better my problem:
I have a QAction connected through the triggered() signal to a given slot. I have to pass this QAction to another part of my program. This other module has to create a new QAction (it cannot be the one I passed) but that must be connected to the same slot when the triggered signal is emitted.
-
QObject has a function "receivers":http://qt-project.org/doc/qt-4.8/qobject.html#receivers . Unfortunatly this only returns the number of receivers, but maybe if you have a look at the source code you can find a way?