diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/network.qdoc | 3 | ||||
-rw-r--r-- | doc/src/declarative/propertybinding.qdoc | 18 |
3 files changed, 16 insertions, 7 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index 6d9d1f2..e983ad0 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -131,7 +131,7 @@ The following functions on the global object allow you to dynamically create QML items from files or strings. You can also dynamically create objects in a declarative manner, using items -such as ListView, Repeater and Loader. +such as ListView, \l Repeater and \l Loader. \section2 createComponent(url file) This function takes the URL of a QML file as its only argument. It returns diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index 4ed5ca2..ed20e66e 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -153,8 +153,9 @@ compiled into the executable. \section1 Limitations -The \c import statement only works network transparently if it has an "as" clause. +The \c import statement is only network transparent if it has an "as" clause. +More specifically: \list \o \c{import "dir"} only works on local file systems \o \c{import libraryUri} only works on local file systems diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 2b8a58c..8d0ffa9 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -48,7 +48,7 @@ a property's value to be expressed as an ECMAScript expression that defines the to other property values or data accessible in the application. The property value is automatically kept up to date if the other properties or data values change. -Property bindings are created implicitly in QML whenever an property is assigned an ECMAScript +Property bindings are created implicitly in QML whenever a property is assigned an ECMAScript expression. The following QML uses two property bindings to connect the size of the rectangle to that of \c otherItem. @@ -68,14 +68,14 @@ expression! Here are some examples of more complex bindings: \code Rectangle { Script { - function calculateMyWidth() { - return Math.max(otherItem.width, thirdItem.width); + function calculateMyHeight() { + return Math.max(otherItem.height, thirdItem.height); } } anchors.centerIn: parent width: Math.min(otherItem.width, 10) - height: calculateMyWidth() + height: calculateMyHeight() color: { if (width > 10) "blue"; else "red" } } \endcode @@ -97,6 +97,14 @@ The implicit binding syntax shown previously is easy to use and works perfectly of bindings. In some advanced cases, it is necessary to create bindings explicitly using the \l Binding element. -XXX - need an example +For example, to bind a property exposed from C++ (\c system.brightness) to a value +coming from QML (\c slider.value), you could use the Binding element as follows: +\qml +Binding { + target: system + property: "brightness" + value: slider.value +} +\endqml */ |