diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-08-21 01:21:13 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-08-21 01:21:13 (GMT) |
commit | a88f47b6871d45b12d8a7d69d78e2d03ed4ddbbf (patch) | |
tree | d96f551172fc3b7b0fad9c26059e505b24e20c6f /doc/src | |
parent | 1a9ea49352a06757aa8af7dd9d516306dfef6f72 (diff) | |
parent | 5d1aeb0ac86d373920f03d0e4c96a5e315b0eb12 (diff) | |
download | Qt-a88f47b6871d45b12d8a7d69d78e2d03ed4ddbbf.zip Qt-a88f47b6871d45b12d8a7d69d78e2d03ed4ddbbf.tar.gz Qt-a88f47b6871d45b12d8a7d69d78e2d03ed4ddbbf.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/binding.qdoc | 14 | ||||
-rw-r--r-- | doc/src/declarative/elements.qdoc | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/doc/src/declarative/binding.qdoc b/doc/src/declarative/binding.qdoc index a649f3f..064f686 100644 --- a/doc/src/declarative/binding.qdoc +++ b/doc/src/declarative/binding.qdoc @@ -5,17 +5,17 @@ Data binding provides a declarative way of specifying the data associated with objects, as well as the relationship between data of different objects. For example, you could bind the text of a label to the value of a slider: as the value of the slider changed, the label would be automatically updated with the new value. -Bindings are created in QML when an expression is assigned to a property. For example, the following produces two rectangles of equal size (\c rect2 is bound to the size of \c rect1): +Bindings are created in QML when an expression is assigned to a property. For example, the following produces two rectangles of equal size (\c Rect2 is bound to the size of \c Rect1): \code -Rectangle { id: rect1; width: 100; height: 100 } -Rectangle { id: rect2; width: rect1.width; height: rect1.height } +Rectangle { id: Rect1; width: 100; height: 100 } +Rectangle { id: Rect2; width: Rect1.width; height: Rect1.height } \endcode -There is also a special \l Bind element, which is typically used to bind from the UI to the underlying UI model (see \l {Passing Data Between C++ and QML} for an example of this). The bindings above could be expressed using the \l Bind element as: +There is also a special \l Binding element, which is typically used to bind from the UI to the underlying UI model (see \l {Passing Data Between C++ and QML} for an example of this). The bindings above could be expressed using the \l Binding element as: \code -Bind { target: rect2; property: "width"; value: rect1.width } -Bind { target: rect2; property: "height"; value: rect1.height } +Binding { target: Rect2; property: "width"; value: Rect1.width } +Binding { target: Rect2; property: "height"; value: Rect1.height } \endcode In addition to binding directly to a property, you can also bind to the results of expressions involving properties. For example: @@ -102,7 +102,7 @@ Finally, in QML you can make the appropriate bindings, so in \c "MyUI.qml": \code Slider { value: screen.brightness } -Bind { target: screen; property: "brightness"; value: slider.value } +Binding { target: screen; property: "brightness"; value: slider.value } \endcode The \l QBindableMap class provides a convenient way to make data visible to the bind engine. diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 2d43fda..aef05d7 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -40,7 +40,7 @@ The following table lists the QML elements provided by the Qt Declarative module \o \list -\o \l Bind +\o \l Binding \o \l ListModel \o \l VisualItemModel \o \l XmlListModel and XmlRole |