I'm not 100% sure of what you're doing, but I may know enough to be helpful.

I think what you are doing is pub/sub; I don't think it matters who creates the subs.

I don't know the particulars of your subs. Do you know the max number? Do you know the names of the objects ahead of time?

If the answer to the above 2 questions is yes, I can suggest something.

Let's say you have 3 objects that can subscribe to a publisher. Or put another way, 3 slots that can possibly be connected to a signal. That means there are 7 possible combinations. That means you can have 7 signals each with their own corresponding connect to a slot or slots.

bool QObject::connect(ptrPublisher, SIGNAL(Signal_1(), ptrSubscriber, SLOT(Slot_1() );

bool QObject::connect(ptrPublisher, SIGNAL(Signal_2(), ptrSubscriber, SLOT(Slot_2() );

bool QObject::connect(ptrPublisher, SIGNAL(Signal_3(), ptrSubscriber, SLOT(Slot_3() );

bool QObject::connect(ptrPublisher, SIGNAL(Signal_4(), ptrSubscriber, SLOT(Slot_1() );
bool QObject::connect(ptrPublisher, SIGNAL(Signal_4(), ptrSubscriber, SLOT(Slot_2() );

etc.


Possible slots: (1), (2), (3), (1,2), (1,3), (2,3), (1,2,3)


How you determine which slots are to be connected is up to you (if-else, switch statement, etc.)

When you determine which slots are to be connected, just emit the appropriate signal.