connect(e,
SIGNAL(somethingHappened
(QString,
int)), c,
SIGNAL(somethingHappened
(QString,
int)));
...
connect(c,
SIGNAL(somethingHappened
(QString,
int)), a,
SIGNAL(somethingHappened
(QString,
int)));
...
connect(a,
SIGNAL(somethingHappened
(QString,
int)),
log,
SLOT(setLog
(QString,
int)));
connect(e, SIGNAL(somethingHappened(QString, int)), c, SIGNAL(somethingHappened(QString, int)));
...
connect(c, SIGNAL(somethingHappened(QString, int)), a, SIGNAL(somethingHappened(QString, int)));
...
connect(a, SIGNAL(somethingHappened(QString, int)), log, SLOT(setLog(QString, int)));
To copy to clipboard, switch view to plain text mode
This way, "e" and "log" doesn't have to know anything about each other nor do you have to have pointers to both of them anywhere to establish a direct connection. C could for example establish connection between "this" and E (where E is created), or alternatively E could establish connection between itself and it's parent (C).
Bookmarks