From 022891bcd8ae4e8de02cdef9ed281e9a31eedbc4 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 26 Nov 2021 15:49:18 +0100 Subject: 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 Reviewed-by: Ivan Solovev Reviewed-by: Fabian Kosmale --- src/corelib/doc/src/objectmodel/bindableproperties.qdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/corelib/doc/src/objectmodel') 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. -- cgit v1.2.3