9
ListElement { kind: "Bought" }
10
ListElement { kind: "Available To Buy" }
15
objectName: "list" + index
16
height: count * itemHeight
20
if (innerList.foo == 0) return 50;
23
property int itemHeight: innerList.foo == 0 ? 200 : 50;
25
property int foo: index
26
property bool enableRange: true
27
onEnableRangeChanged: updatedDelegateCreationRange();
31
height: innerList.itemHeight
33
width: parent.width - 20
34
height: parent.height - 20
35
anchors.centerIn: parent
37
if (innerList.foo == 0) return Math.random() * 2 > 1 ? "green" : "yellow";
38
else return Math.random() * 2 > 1 ? "red" : "blue";
46
delegateCreationBegin: enableRange ? 0 : undefined
47
delegateCreationEnd: enableRange ? 0 : undefined
49
function updatedDelegateCreationRange() {
51
delegateCreationBegin = undefined
52
delegateCreationEnd = undefined
56
if (list.contentY + list.height <= y) {
58
delegateCreationBegin = 0
59
delegateCreationEnd = 0
60
} else if (y + height <= list.contentY) {
62
delegateCreationBegin = height
63
delegateCreationEnd = height
65
delegateCreationBegin = Math.max(list.contentY - y, 0)
66
delegateCreationEnd = Math.min(list.contentY + list.height - y, height)
70
Component.onCompleted: updatedDelegateCreationRange();
73
onContentYChanged: updatedDelegateCreationRange();
74
onHeightChanged: updatedDelegateCreationRange();
78
section.property: "kind"
79
section.delegate: Text {
b'\\ No newline at end of file'