diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-10-09 06:49:06 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-10-09 06:49:06 (GMT) |
commit | 8a88e6cf15636b0adaf5547e5fa883e9631ae1cb (patch) | |
tree | 5c6dc93de9cb23648322c7bd21805c0bd005cdce /examples | |
parent | 89a5a33d5643eb31bb44adce8a8fd65986d76c20 (diff) | |
download | Qt-8a88e6cf15636b0adaf5547e5fa883e9631ae1cb.zip Qt-8a88e6cf15636b0adaf5547e5fa883e9631ae1cb.tar.gz Qt-8a88e6cf15636b0adaf5547e5fa883e9631ae1cb.tar.bz2 |
fixes gridview.qml
Task-number: QT-2271
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/gridview/gridview.qml | 52 |
1 files changed, 15 insertions, 37 deletions
diff --git a/examples/declarative/gridview/gridview.qml b/examples/declarative/gridview/gridview.qml index 2e5110a..93931c7 100644 --- a/examples/declarative/gridview/gridview.qml +++ b/examples/declarative/gridview/gridview.qml @@ -4,57 +4,35 @@ Rectangle { width: 300; height: 400; color: "white" ListModel { - id: AppModel - ListElement { - name: "Music" - icon: "AudioPlayer_48.png" - } - ListElement { - name: "Movies" - icon: "VideoPlayer_48.png" - } - ListElement { - name: "Camera" - icon: "Camera_48.png" - } - ListElement { - name: "Calendar" - icon: "DateBook_48.png" - } - ListElement { - name: "Messaging" - icon: "EMail_48.png" - } - ListElement { - name: "Todo List" - icon: "TodoList_48.png" - } - ListElement { - name: "Contacts" - icon: "AddressBook_48.png" - } + id: appModel + ListElement { name: "Music"; icon: "pics/AudioPlayer_48.png" } + ListElement { name: "Movies"; icon: "pics/VideoPlayer_48.png" } + ListElement { name: "Camera"; icon: "pics/Camera_48.png" } + ListElement { name: "Calendar"; icon: "pics/DateBook_48.png" } + ListElement { name: "Messaging"; icon: "pics/EMail_48.png" } + ListElement { name: "Todo List"; icon: "pics/TodoList_48.png" } + ListElement { name: "Contacts"; icon: "pics/AddressBook_48.png" } } Component { - id: AppDelegate + id: appDelegate Item { width: 100; height: 100 - Image { id: Icon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon } - Text { anchors.top: Icon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name } + Image { id: myIcon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon } + Text { anchors.top: myIcon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name } } } Component { - id: AppHighlight - Rectangle { width: 80; height: 80; color: "#FFFF88" } + id: appHighlight + Rectangle { width: 80; height: 80; color: "lightsteelblue" } } GridView { - id: List1 anchors.fill: parent cellWidth: 100; cellHeight: 100 - model: AppModel; delegate: AppDelegate - highlight: AppHighlight + model: appModel; delegate: appDelegate + highlight: appHighlight focus: true } } |