Thanks Jens! That seems to work great for the example code I gave.
As to whether or not I actually need nested listviews, that’s a good question. You are correct that I don’t want the nested lists to be flickables but I also eventually need to make each item in the sublists selectable. I’m certainly a QML beginner so I don’t know exactly what ListView provides that Repeater does not. From the little experience I have, however, it seems like selectable sublists should be at least easily faked within the Repeaters…
For anyone interested, here’s the updated code with Jens’ suggested changes:
ListView {
anchors.fill: parent
model: 5
delegate:
Column {
width: parent.width
Text {
width: parent.width
text: "This could be a really long string in the header"
wrapMode: Text.WordWrap
}
Repeater {
width: parent.width
model: 5
Text {
id: itemRow
width: parent.width
text: "This could be a really long string in the lists"
wrapMode: Text.WordWrap
}
}
}
}
↧