QBindable: Add doc example for ctor taking property name

Change-Id: I36de517291ef940d6fa284e062d44a5b619c0018
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit b7184e110434cdae127d03a1467ba6fb02607768)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Fabian Kosmale 2023-06-23 15:51:04 +02:00 committed by Qt Cherry-pick Bot
parent 88ec95d25f
commit e4101bf6ca

View File

@ -1192,13 +1192,20 @@ QString QPropertyBindingError::description() const
usable directly without reading through a QBindable use \l QProperty or
\l QObjectBindableProperty.
\code
QProperty<QString> displayText;
QDateTimeEdit *dateTimeEdit = findDateTimeEdit();
QBindable<QDateTime> dateTimeBindable(dateTimeEdit, "dateTime");
displayText.setBinding([dateTimeBindable](){ return dateTimeBindable.value().toString(); });
\endcode
\sa QProperty, QObjectBindableProperty, {Qt Bindable Properties}
*/
/*!
\fn template<typename T> QBindable<T>::QBindable(QObject *obj, const QMetaProperty &property)
See \c \l QBindable::QBindable(QObject *obj, const char *property)
See \l QBindable::QBindable(QObject *obj, const char *property)
*/
/*!