[Qt-interest] Signal chaining

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Mar 29 12:47:16 CEST 2010


Hi All,

I have a requirement where I need to send out a notification (as a
signal) to the user of my lib. The lib internally uses other helper
classes for getting the notification. These classes are not exposed
outside. All classes are QObjects.

Eg: Class A (ext visible) --uses--> Class B (internal) --uses-->Class
C (internal)

One way is to emit signal from C, connect it to B, which in turn would
"re-emit"  it out to A, and so on (All signal-slot connections will be
direct (not queued) since it operates in a single thread's context).

Would it be lighter to use simple callbacks? (but then I would need
the inner most class "C" to know about "A", since  finally A emits it
out to a "user")

I'm running this in an embedded box and was worried about the overhead
of chaining these signals. If it's not much, I would prefer to use
signals.

-mandeep



More information about the Qt-interest-old mailing list