Qt 4.8
Connections Class Reference

A Connections element describes generalized connections to signals. More...

Detailed Description

A Connections element describes generalized connections to signals.

Since
4.7

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:

onClicked: { foo(parameters) }
}

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:

onClicked: foo(parameters)
}
}

More generally, the Connections object can be a child of some object other than the sender of the signal:

id: area
}
// ...
target: area
onClicked: foo(parameters)
}
See also
QtDeclarative

The documentation for this class was generated from the following file: