
Originally Posted by
beemaneni
It makes sense for my requirement buddy..
I meant it doesn't make sense in a declarative environment.
I have a ListView which has n number of items and each item has a repeater associated with it.Inside the repeater i have a text item where i am reading an array of strings as common for all the items in the listview.So index will be useful only till that repeater where as after that it becomes 0 for the next listview item.i do not want that to become 0 .Hope u will understand my requirement now.
The repeater will have its own index.
import QtQuick 2.1
ListView {
model: 5
width: 300
height: 300
delegate: Column {
property int lvIndex: index
width: 300
Text { text: "ListView index "+lvIndex }
Repeater {
model: 4
Text { text: "Repeater index "+lvIndex+"."+index }
}
}
}
import QtQuick 2.1
ListView {
model: 5
width: 300
height: 300
delegate: Column {
property int lvIndex: index
width: 300
Text { text: "ListView index "+lvIndex }
Repeater {
model: 4
Text { text: "Repeater index "+lvIndex+"."+index }
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks