summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-23 08:08:28 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-23 08:08:28 (GMT)
commitaf5cda49d5b6fa22e1cb1567ac874787e31a87c2 (patch)
treeb4f0b826b7a88845938ad074d105efe0d575a424 /doc/src
parente6694ebe4081b807b1bb0946e17e73840019ec6d (diff)
parenteb395badcba6eada75ad5e6a72b74f5204170ed9 (diff)
downloadQt-af5cda49d5b6fa22e1cb1567ac874787e31a87c2.zip
Qt-af5cda49d5b6fa22e1cb1567ac874787e31a87c2.tar.gz
Qt-af5cda49d5b6fa22e1cb1567ac874787e31a87c2.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: WorkerScript could starve image loading of CPU. More docs for FolderListModel Improve docs on attached properties on view delegates. Models which load incrementally via fetchMore() don't work. Try fixing build error on Windows Ensure PathView doesn't jump when starting to drag. Nested flickables would react alternately to flicks. Improve QDeclarativeComponent test coverage. Add additional QDeclarativeProperty autotests. Removing all visible items in ListView resulted in blank view. XmlListModel requests should set 'Accept' header to 'application/xml'
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/declarative/gridview/gridview.qml26
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml14
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml4
-rw-r--r--doc/src/snippets/declarative/pathview/pathview.qml14
4 files changed, 50 insertions, 8 deletions
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml
index 73e58ec..87d70de 100644
--- a/doc/src/snippets/declarative/gridview/gridview.qml
+++ b/doc/src/snippets/declarative/gridview/gridview.qml
@@ -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]
+
}
}
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 8ba47a8..370429e 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -127,10 +127,16 @@ ListView {
Component {
id: contactsDelegate
- Text {
- id: contactInfo
- text: name + ": " + number
- color: contactInfo.ListView.isCurrentItem ? "red" : "black"
+ Rectangle {
+ id: wrapper
+ width: 180
+ height: contactInfo.height
+ color: ListView.isCurrentItem ? "black" : "red"
+ Text {
+ id: contactInfo
+ text: name + ": " + number
+ color: wrapper.ListView.isCurrentItem ? "red" : "black"
+ }
}
}
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]