Please help me with this.
I have created a ListView in QML file and filled it with data received from a webservice.Since this web service does not provide any images, i have to place a dummy image in that place. Then i used another method to fetch the images from the url.Now i got the image in my cpp file.But i couldn't update my listview. I have tried out many methods.But failed. Here is my code snippet.
ListView {
id: listView
objectName: "listView"
dataModel: ArrayDataModel {
id: myListModel
}
// Override default GroupDataModel::itemType() behaviour, which is to return item type "header"
listItemComponents: ListItemComponent {
id: listcomponent
// StandardListItem is a convivience component for lists with default cascades look and feel
StandardListItem {
id: stdlst
title: ListItemData.postText
description: ListItemData.postDate
status: ListItemData.filePath
imageSource: assets:///image.png
}
}
layoutProperties: StackLayoutProperties {
spaceQuota: 1.0
}
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
}
I need to replace the imagSource in this listview with other image.How can i do it..?