Return to site

Qt multiple signals to one slot

broken image
broken image

This makes development easily modular and expandible. In this way - Qt controls the flow of action based on how an object is listening for and informing about events, without needing to specifically know what is listening. You can connect your slots to any number of signals and signals to any number of slots. In your controller layer (any of the subclasses we've already worked with) you can listen for those signals and connect them to a slot, which, at the Python level, can just be any callable method. A Qt Object will emit a signal when a particular event (such as a user clicking a button or an action being triggered or a selection change) is fired.

broken image

In Qt lingo - events are managed via signals and slots. This is going to be an introduction to how that system works, becuase you should embrace their development paradigm as soon as you can, or you may end up fighting against it unnecessarily and banging your head against a wall.

broken image

The way that Qt is structured forces us into this model when working with widgets and their MVC (model-view-controller) system. So whether or not you realize it, so far all the examples we've worked through have been preparing you for event-driven programming.

broken image