[SailfishDevel] Hidden information to ListView
Jukka Heikkilä
jutsco at gmail.com
Sat Feb 22 19:19:54 UTC 2014
I'm creating page which shows some information which is returned from
local storage. I have successfully created the next code which will
work:
Page {
root
Component.onCompleted: {
//External Function which return the items from Local Storage
items = DB.listItems();
//Adding items to list view
for(var i = 0; i < items.rows.length; i++){
listItems.model.append({"itemValue":
items.rows.item(i).itemValue})
}
}
SilicaListView {
id: listItems
model: listModel
VerticalScrollDecorator {}
delegate: ListItem {
id: contentListItem
Label {
text: itemValue
}
}
}
ListModel {
id: listModel
}
}
I would like to include some hidden values (e.g. DB row ID) for later
usage, but is there possibilities to include extra data with same
append command to the ListItem? I know the properties, but I haven't
managed how to pass the variables in it.
I would be grateful for your help.
Kind Regards,
Jukka
@Juukks
More information about the Devel
mailing list