diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-11-23 10:51:57 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-30 22:19:40 +0000 |
commit | 2e09a400323fcdd41133cf41a49938a0c3e2e149 (patch) | |
tree | c2e1c243f3d3d33de096ef28285047c0800f627d /src | |
parent | 6d08f6c031465e96b436c9f4ab21ad384a0bea4c (diff) |
Doc: Document BINDABLE attribute for Q_PROPERTY macro
Fixes: QTBUG-87036
Change-Id: Ia6067d887b9b697dbcb8e02bce5a560a8ac5eaf3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit af7f7732cb52888c468b3e86a67e61b83fee11e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/doc/snippets/code/doc_src_properties.cpp | 1 | ||||
-rw-r--r-- | src/corelib/doc/src/objectmodel/properties.qdoc | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/code/doc_src_properties.cpp b/src/corelib/doc/snippets/code/doc_src_properties.cpp index 5a5627abfd..838cb980f7 100644 --- a/src/corelib/doc/snippets/code/doc_src_properties.cpp +++ b/src/corelib/doc/snippets/code/doc_src_properties.cpp @@ -59,6 +59,7 @@ Q_PROPERTY(type name [SCRIPTABLE bool] [STORED bool] [USER bool] + [BINDABLE bindableProperty] [CONSTANT] [FINAL] [REQUIRED]) diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc index e3c506e8bc..9a2517e050 100644 --- a/src/corelib/doc/src/objectmodel/properties.qdoc +++ b/src/corelib/doc/src/objectmodel/properties.qdoc @@ -131,6 +131,12 @@ editable property for (checkable) buttons. Note that QItemDelegate gets and sets a widget's \c USER property. + \li The \c {BINDABLE bindableProperty} attribute indicates that the + property supports bindings, and that it is possible to set and inspect + bindings to this property via the meta object system (QMetaProperty). + \c bindableProperty names a class member of type QBindable<T>, where T + is the property type. This attribute was introduced in Qt 6.0. + \li The presence of the \c CONSTANT attribute indicates that the property value is constant. For a given object instance, the READ method of a constant property must return the same value every time it is called. This |