Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How to connect a property signal to a Javascript function.

$
0
0
Note that the “valueChanged” function is a function property of “obj” and not of the “value” property of “obj”. So, instead of: obj.value.valueChanged.connect(objEventHandler) you should use obj.valueChanged.connect(objEventHandler) Depending on the situation, using a declarative Connections element is better, though (for example, if the target of the dynamic connection can change depending on the situation). In some situations, on the other hand, using an imperative connection can be better (as you don’t incur the overhead of constructing an extra QObject). Cheers, Chris.

Viewing all articles
Browse latest Browse all 4972

Trending Articles