python - How to broadcast a signal in Qt4 -


I want a pattern in the Qt4 (PyQt4) program where no component can respond to the signal without any signal This is coming from

My primary reading reveals that I have to connect the signals clearly in the slots but whatever I want is to send the signal to any single component, To process by component

with another toolkit Ulna to, for example, in wxWidgets I use events that are automatically offered to parents of child windows / objects. At each level they can be handled. This means that if I have a lot of children who can emit the same event, then I do not have to connect them all clearly, I just have to parent some high level in handler or window hierarchy I can put it This means that only incident generators and consumers will have to know everything about this incident. The consumer does not need to know where the source of the incident is, how many such sources are, or anything else about it.

Is it possible in QT - is there another way? Perhaps there is an alternative phenomenon for signals and slots?

This is not easily possible - you should know something about the signal object and getting it On the basis of the object you need to connect, however, you may be able to establish a class that mediates between two (objects with the signs tell the class that they exist, and are such signs , While the objects of the slot tell the class they exist And there is such a place to connect to a given signal, and the moderator class tracks both of them, make connections if necessary.


Comments