diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-11-26 15:49:18 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-12-02 12:53:34 +0100 |
commit | 022891bcd8ae4e8de02cdef9ed281e9a31eedbc4 (patch) | |
tree | 31c3228b888f891298a75dc730eb45006f85a03b /src/corelib/doc/src/objectmodel | |
parent | cee89e70a6011c3fcae29ad95d5fec4b2026d055 (diff) |
Document the example showing the benefits of using bindable properties
And mention the example in the bindable properties docs.
Pick-to: 6.2
Task-number: QTBUG-97655
Change-Id: I676e90dbda66c2e718c7f6c2240fac608a8653df
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/doc/src/objectmodel')
-rw-r--r-- | src/corelib/doc/src/objectmodel/bindableproperties.qdoc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/doc/src/objectmodel/bindableproperties.qdoc b/src/corelib/doc/src/objectmodel/bindableproperties.qdoc index dc83c01e3d..391ce4baf7 100644 --- a/src/corelib/doc/src/objectmodel/bindableproperties.qdoc +++ b/src/corelib/doc/src/objectmodel/bindableproperties.qdoc @@ -45,6 +45,20 @@ uses the encapsulating QObject to store the pointer to the management data structure. + \section1 Why Use Bindable Properties? + + Property bindings are one of the core features of QML. They allow to specify + relationships between different object properties and automatically update + properties' values whenever their dependencies change. Bindable properties + allow to achieve the same not only in QML code, but also in C++. Using + bindable properties can help to simplify your program, by eliminating a lot + of boilerplate code for tracking and reacting to dependency updates of + different objects. + + The \l {Introductory Example} below demonstrates the usage of bindable + properties in C++ code. You can also check \l {Bindable Properties Example} + to see how the bindable properties can help to improve your code. + \section1 Introductory Example The binding expression computes the value by reading other QProperty values. |