diff options
Diffstat (limited to 'doc/src/qml/javascriptblocks.qdoc')
-rw-r--r-- | doc/src/qml/javascriptblocks.qdoc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/src/qml/javascriptblocks.qdoc b/doc/src/qml/javascriptblocks.qdoc index b9f1e6f0b8..a898f20049 100644 --- a/doc/src/qml/javascriptblocks.qdoc +++ b/doc/src/qml/javascriptblocks.qdoc @@ -72,7 +72,7 @@ Rectangle { id: button width: 200; height: 80; color: "lightsteelblue" - MouseArea { + MouseArea { id: mousearea anchors.fill: parent @@ -103,7 +103,7 @@ Rectangle { color: mousearea.pressed ? "steelblue" : "lightsteelblue" - MouseArea { + MouseArea { id: mousearea anchors.fill: parent } @@ -366,6 +366,15 @@ Likewise, the \l {Component::onDestruction} attached property is triggered on component destruction. +\section1 JavaScript and Property Binding + +Property bindings can be created in JavaScript by assigning the property the value returned +by calling Qt.binding() where the parameter to Qt.binding() is a \c function +that returns the required value. + +See \l {qml-javascript-assignment}{Property Assignment versus Property Binding} for details. + + \section1 QML JavaScript Restrictions QML executes standard JavaScript code, with the following restrictions: |