diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-12-23 05:01:58 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-12-23 05:01:58 (GMT) |
commit | 508d52477fe16f3b425e5d3ec65584e86ed939b3 (patch) | |
tree | a59646329e915930777381c290715c82864ff488 /doc/src/snippets/declarative/pathview | |
parent | 16d08f97eaa7dd0469d7c9006546f86f1fd763f6 (diff) | |
download | Qt-508d52477fe16f3b425e5d3ec65584e86ed939b3.zip Qt-508d52477fe16f3b425e5d3ec65584e86ed939b3.tar.gz Qt-508d52477fe16f3b425e5d3ec65584e86ed939b3.tar.bz2 |
Improve docs on attached properties on view delegates.
Clarify that the properties are attached to the root of the delegate,
and must be accessed as such by child items.
Task-number: QTBUG-16193
Reviewed-by: Bea Lam
Diffstat (limited to 'doc/src/snippets/declarative/pathview')
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathattributes.qml | 4 | ||||
-rw-r--r-- | doc/src/snippets/declarative/pathview/pathview.qml | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index d6dacdb..be933e0 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -52,8 +52,8 @@ Rectangle { scale: PathView.iconScale opacity: PathView.iconOpacity Column { - Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { text: name; font.pointSize: 16} + Image { anchors.horizontalCenter: nameText.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: nameText; text: name; font.pointSize: 16 } } } } diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index 93298c4..e5e90a4 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -48,8 +48,18 @@ Rectangle { Component { id: delegate Column { - Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { text: name; font.pointSize: 16 } + id: wrapper + Image { + anchors.horizontalCenter: nameText.horizontalCenter + width: 64; height: 64 + source: icon + } + Text { + id: nameText + text: name + font.pointSize: 16 + color: wrapper.PathView.isCurrentItem ? "red" : "black" + } } } //! [1] |