Qt 4.8
|
A Connections element describes generalized connections to signals. More...
A Connections element describes generalized connections to signals.
A Connections object creates a connection to a QML signal.
When connecting to signals in QML, the usual way is to create an "on<Signal>" handler that reacts when a signal is received, like this:
However, it is not possible to connect to a signal in this way in some cases, such as when:
When any of these are needed, the Connections element can be used instead.
For example, the above code can be changed to use a Connections object, like this:
More generally, the Connections object can be a child of some object other than the sender of the signal: