See the introduction of "Signals and Slots".
From the design pattern point of view, "Signals and Slots" in a certain sense follows the idea of "Command Pattern". The basic idea is to let two objects to work together, but they don't need to know each other. It sounds a little wired, but it can significantly simplify the design, coding and maintaining. With help of this mechanism, components can be better encapsulated and full decoupled to each other. The connection between objects is built up by a simple QObject::connect() function calls. You can connect as many signals as you want to a single slot, and a signal can be connected to as many slots as you need.
The other common methods for the interaction between GUI objects:
- Callback function
- Event
- Data binder.
Reference:
I like fox as its lightweight and less complex than qt. FOX has workarounds in any situation like C++. Qt does present some stonewalls now and then.
ReplyDeleteMy 2 cents