There's probably an answer for this somewhere out there, but its a difficult search to word that doesn't return 100 million results of basic signal/slot questions.

I have a single instance of a class that owns a countdown timer, when the timer reaches 0, I would like it to emit a signal that can be received by any instance of another class without having to hard-code each instance. This obviously can be easily performed by writing out the code for each instance, such as:

Qt Code:
  1. connect(objA, SIGNAL(timeup()), objB1, SLOT(countup()));
  2. connect(objA, SIGNAL(timeup()), objB2, SLOT(countup()));
To copy to clipboard, switch view to plain text mode 

But when there gets to be 10 instances of objB, gets to be a little much, especially when that 10 today could be 20 by the end of the project. Was hoping for a way to just say

Qt Code:
  1. connect(objA, SIGNAL(timeup()), &objB, SLOT(countup()));
To copy to clipboard, switch view to plain text mode 

where objB is the defined name of the class before any instances of it are invoked.

Thanks!