[Qt-interest] How to iterate over receivers connected to a signal?

Dave Schuhman dave130980 at hotmail.com
Thu Jun 18 16:56:52 CEST 2009





Hi,

Problem:
How do I iterate over all receivers which have been connected to a signal of a QObject?

Details:
I
know how to get all signals of a QObject and how to get the number of
receivers connected to each of those signals but I miss a method like
getReceiver( signalId/signature, receiverIndex ) which gives me
concrete receivers of a signal.
I dont want to use
notifyConnect/notifyDisconnect since the information is already in the
QObject and it seems useless/inefficient to me to fully track
signal/receiver connections just for that purpose. I have looked into
the QObject source: for example in the receivers() method of QObject
wich gives me the count of receivers and as far as I see it uses d_func
to get the information. I dont understand exactly how it is doing this
but d_func seems to use private data which I guess isnt supposed to be
used from outside.

Thanks in advance for any help/hints,
David
_________________________________________________________________
http://redirect.gimas.net/?n=M0906xFTP_SpringCampaign2_WW
--> Für Fotos hier abdrücken <-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090618/a87ea0a5/attachment.html 


More information about the Qt-interest-old mailing list