summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/objectmodel/properties.qdoc
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-06-09 13:23:33 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-06-22 16:05:07 +0200
commit2c0518eb62ebe475abf84b8ee2fd50c53720d3a4 (patch)
tree1e729142d25a1452d4be02fd743180ddc22f307e /src/corelib/doc/src/objectmodel/properties.qdoc
parent073214fdf943e1a0beb660a039e39dc1ea43836e (diff)
moc: Allow reading property values through bindables
The behavior is similar to MEMBER: If the READ accessor is "default", synthesize it using the bindable. [ChangeLog][QtCore] You can now specify "READ default" in a Q_PROPERTY if you also specify a BINDABLE. moc will synthesize a READ accessor in that case. Task-number: QTBUG-97249 Change-Id: I4a275adabaed12df95dac505095f847c4be65dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/doc/src/objectmodel/properties.qdoc')
-rw-r--r--src/corelib/doc/src/objectmodel/properties.qdoc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/doc/src/objectmodel/properties.qdoc b/src/corelib/doc/src/objectmodel/properties.qdoc
index 94078b5b6c..7276e8d86a 100644
--- a/src/corelib/doc/src/objectmodel/properties.qdoc
+++ b/src/corelib/doc/src/objectmodel/properties.qdoc
@@ -44,7 +44,9 @@
specified. It is for reading the property value. Ideally, a const function
is used for this purpose, and it must return either the property's type or a
const reference to that type. e.g., QWidget::focus is a read-only
- property with \c READ function, QWidget::hasFocus().
+ property with \c READ function, QWidget::hasFocus(). If a \c BINDABLE is
+ specified, you can write \c{READ default} to have the \c READ accessor
+ generated from the \c BINDABLE.
\li A \c WRITE accessor function is optional. It is for setting the
property value. It must return void and must take exactly one