From dba7eb104f7788fda36e8a2ecffc8f4c08ec1fae Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Wed, 3 Mar 2010 16:59:04 +1000 Subject: Add documentation for the 'when' property of Binding. --- src/declarative/util/qdeclarativebind.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp index e95a03e..26baa38 100644 --- a/src/declarative/util/qdeclarativebind.cpp +++ b/src/declarative/util/qdeclarativebind.cpp @@ -72,7 +72,7 @@ public: /*! \qmlclass Binding QDeclarativeBind - \since 4.7 + \since 4.7 \brief The Binding element allows arbitrary property bindings to be created. Sometimes it is necessary to bind to a property of an object that wasn't @@ -114,6 +114,19 @@ QDeclarativeBind::~QDeclarativeBind() { } +/*! + \qmlproperty bool Binding::when + + This property holds when the binding is active. + This should be set to an expression that evaluates to true when you want the binding to be active. + + \code + Binding { + target: contactName; property: 'text' + value: name; when: list.ListView.isCurrentItem + } + \endcode +*/ bool QDeclarativeBind::when() const { Q_D(const QDeclarativeBind); -- cgit v0.12