diff options
author | Jerome Pasion <jerome.pasion@nokia.com> | 2011-01-17 09:23:06 (GMT) |
---|---|---|
committer | Jerome Pasion <jerome.pasion@nokia.com> | 2011-01-17 09:23:06 (GMT) |
commit | 9657c4fa2040758b8aa3a5f7f7c81442cbaba621 (patch) | |
tree | 1d9b018f9563fa6eff1059291dc9edf94be67c9b /doc/src/snippets/declarative/gridview/gridview.qml | |
parent | b5d34f3daafc843c9f9cb63cf8e2733900f0be69 (diff) | |
parent | ec0d663282e191bfb9837e76e709ed2ffe6e8aac (diff) | |
download | Qt-9657c4fa2040758b8aa3a5f7f7c81442cbaba621.zip Qt-9657c4fa2040758b8aa3a5f7f7c81442cbaba621.tar.gz Qt-9657c4fa2040758b8aa3a5f7f7c81442cbaba621.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Conflicts:
doc/src/declarative/elements.qdoc
doc/src/declarative/extending.qdoc
src/declarative/qml/qdeclarativecomponent.cpp
Diffstat (limited to 'doc/src/snippets/declarative/gridview/gridview.qml')
-rw-r--r-- | doc/src/snippets/declarative/gridview/gridview.qml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index 73e58ec..11bb45b 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -132,6 +132,32 @@ GridView { } //![highlightFollowsCurrentItem] +//![isCurrentItem] +GridView { + width: 300; height: 200 + cellWidth: 80; cellHeight: 80 + + Component { + id: contactsDelegate + Rectangle { + id: wrapper + width: 80 + height: 80 + color: GridView.isCurrentItem ? "black" : "red" + Text { + id: contactInfo + text: name + ": " + number + color: wrapper.GridView.isCurrentItem ? "red" : "black" + } + } + } + + model: ContactModel {} + delegate: contactsDelegate + focus: true +} +//![isCurrentItem] + } } |