diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-10 01:19:48 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-10 01:23:51 (GMT) |
commit | 2306073c6806e3e35d0786fec5c49e165b119e36 (patch) | |
tree | 7dac894964284deb8ceb570f4935b2e0d6b73726 /src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | |
parent | d346ba1ec7a1becd5120fbe181da0374606481c6 (diff) | |
download | Qt-2306073c6806e3e35d0786fec5c49e165b119e36.zip Qt-2306073c6806e3e35d0786fec5c49e165b119e36.tar.gz Qt-2306073c6806e3e35d0786fec5c49e165b119e36.tar.bz2 |
Document attached properties
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index e133adb..410f526 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -119,7 +119,7 @@ public: delegate (items). An item can determine its index within the - model via the \c VisualItemModel.index attached property. + model via the \l{VisualItemModel::index}{index} attached property. The example below places three colored rectangles in a ListView. \code @@ -147,6 +147,13 @@ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent) { } +/*! + \qmlattachedproperty int VisualItemModel::index + This attached property holds the index of this delegate's item within the model. + + It is attached to each instance of the delegate. +*/ + QDeclarativeListProperty<QDeclarativeItem> QDeclarativeVisualItemModel::children() { Q_D(QDeclarativeVisualItemModel); |