I am trying to figure out the best way for a QML object to send out a signal and for many other QML elements to respond to it. Normally, if you create signal mySignal
then you have a handler automatically created for you called onMySignal
but that handler exists only within the same element that created the signal.
A particularly inelegant solution could be to store an array of QML elements you want updated when a signal occurs, and then in your handler you loop through all those elements and do what you need.
I'd be surprised if there wasn't an easier way. Am I missing an obvious use case of the signal-slot mechanism in QML?