diff options
Diffstat (limited to 'tests/auto/quick/qquicklistview/data')
-rw-r--r-- | tests/auto/quick/qquicklistview/data/layoutChangeSort.qml | 58 | ||||
-rw-r--r-- | tests/auto/quick/qquicklistview/data/simplelistview.qml | 11 |
2 files changed, 69 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/layoutChangeSort.qml b/tests/auto/quick/qquicklistview/data/layoutChangeSort.qml new file mode 100644 index 0000000000..e54f164e45 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/layoutChangeSort.qml @@ -0,0 +1,58 @@ +import QtQuick 2.0 +import QtQml.Models 2.1 + +Rectangle { + id: root + width: 240 + height: 320 + color: "#ffffff" + + + Component { + id: myDelegate + Rectangle { + id: wrapper + objectName: "wrapper" + height: 20 + width: 240 + Text { + objectName: "delegateText" + text: display + } + color: ListView.isCurrentItem ? "lightsteelblue" : "white" + } + } + + DelegateModel { + id: delegateModel + objectName: "delegateModel" + model: testModel + delegate: myDelegate + } + + ListView { + id: list + objectName: "listView" + model: delegateModel; + focus: true + anchors.fill: parent + + + section { + property: "SortRole"; + delegate: Rectangle { + width: parent.width; + height: 20; + color: "steelblue"; + + Text { + anchors { + fill: parent; + margins: 5; + } + text: section; + } + } + } + } +} diff --git a/tests/auto/quick/qquicklistview/data/simplelistview.qml b/tests/auto/quick/qquicklistview/data/simplelistview.qml new file mode 100644 index 0000000000..56a96150c5 --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/simplelistview.qml @@ -0,0 +1,11 @@ +import QtQuick 2.0 + +ListView { + width: 400 + height: 400 + model: 100 + delegate: Rectangle { + height: 40; width: 400 + color: index % 2 ? "lightsteelblue" : "lightgray" + } +} |