aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2014-05-14 07:59:18 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-16 03:45:18 +0200
commita9884252c31b3a189ea7230ba86aa71342882492 (patch)
tree30782ed1e3a032e811d7cbd91703cb105b1341aa /src/qml/qml/v8
parentea401b8ebff8ee58f6db7b1c623883a72365a2b8 (diff)
Doc: Polish property binding explanations
- Minor rearrangements - Express things more clearly and/or concisely - Add links Change-Id: If1ed639609e39ed1a2c12aed3971da3ee2c8f8a0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index 0bb77d8077..d0d6839bdc 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -1207,18 +1207,16 @@ DEFINE_OBJECT_VTABLE(QQmlBindingFunction);
/*!
\qmlmethod Qt::binding(function)
- Returns a JS object representing a binding expression which may be
- assigned to any property in imperative code to cause a binding
- assignment.
+ Returns a JavaScript object representing a \l{Property Binding}{property binding}.
- There are two main use-cases for the function: firstly, in imperative
- JavaScript code to cause a binding assignment:
+ There are two main use-cases for the function: firstly, to apply a
+ property binding imperatively from JavaScript code:
\snippet qml/qtBinding.1.qml 0
- and secondly, when defining initial property values of dynamically
- constructed objects (via Component.createObject() or
- Loader.setSource()) as being bound to the result of an expression.
+ and secondly, to apply a property binding when initializing property values
+ of dynamically constructed objects (via \l{Component::createObject()}
+ {Component.createObject()} or \l{Loader::setSource()}{Loader.setSource()}).
For example, assuming the existence of a DynamicText component:
\snippet qml/DynamicText.qml 0
@@ -1244,8 +1242,8 @@ DEFINE_OBJECT_VTABLE(QQmlBindingFunction);
\snippet qml/qtBinding.4.qml 0
- \note In \l {Qt Quick 1}, all function assignment was treated as
- binding assignment, so the Qt.binding() function is new in
+ \note In \l {Qt Quick 1}, all function assignments were treated as
+ binding assignments. The Qt.binding() function is new to
\l {Qt Quick}{Qt Quick 2}.
\since 5.0