diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 18:46:38 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 19:02:37 +0200 |
commit | c2f8b9535d34da6948ccf45b7d5fd90de2f1bc9e (patch) | |
tree | c6f7e058a985d7c18b51cadc76283caf555071c9 /tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml | |
parent | 9e633bbda7608ac0231809e2a6a97ae8f2d849d6 (diff) | |
parent | 803f18f02e5609a1ca00a5b78ea6d3613d44e1a0 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Removed dependencies.yaml because we don't use it yet in wip/cmake.
Fixed conflict in qmlcachegen.cpp.
Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
Diffstat (limited to 'tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml')
-rw-r--r-- | tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml b/tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml new file mode 100644 index 0000000000..18ce406e3f --- /dev/null +++ b/tests/auto/quick/qquicklistview/data/listview-sections_delegate_required.qml @@ -0,0 +1,77 @@ +import QtQuick 2.0 + +Rectangle { + property string sectionProperty: "number" + property int sectionPositioning: ViewSection.InlineLabels + width: 240 + height: 320 + color: "#ffffff" + resources: [ + Component { + id: myDelegate + Item { + id: wrapper + objectName: "wrapper" + property string section: ListView.section + property string nextSection: ListView.nextSection + property string prevSection: ListView.previousSection + height: 20; + width: 240 + Rectangle { + height: 20 + width: parent.width + color: wrapper.ListView.isCurrentItem ? "lightsteelblue" : "white" + Text { + text: index + } + Text { + x: 30 + id: textName + objectName: "textName" + text: name + } + Text { + x: 100 + id: textNumber + objectName: "textNumber" + text: number + } + Text { + objectName: "nextSection" + x: 150 + text: wrapper.ListView.nextSection + } + Text { + x: 200 + text: wrapper.y + } + } + ListView.onRemove: SequentialAnimation { + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true } + NumberAnimation { target: wrapper; property: "height"; to: 0; duration: 100; easing.type: Easing.InOutQuad } + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } + } + } + } + ] + ListView { + id: list + objectName: "list" + width: 240 + height: 320 + cacheBuffer: 60 + model: testModel + delegate: myDelegate + section.property: sectionProperty + section.delegate: Rectangle { + id: myDelegate + required property string section + objectName: "sect_" + section + color: "#99bb99" + height: 20 + width: list.width + Text { text: myDelegate.section + ", " + parent.y + ", " + parent.objectName } + } + section.labelPositioning: sectionPositioning + } +} |