Append image in listModel
-
Inside a Rectangle, there is a definition of ListModel
@ ListModel {
id: tagsModel
}@And afterwards, by javascript you can add text to this list
@ tagsModel.append({"title": title, "id":id});@
Where title and id are parsed text from a rss feed.
My problem is that I don't know how to add an image here, the order
@ tagsModel.append({
"type":"image",
"url":"http://doc.qt.nokia.com/whitepapers/qt-quick-tooling-whitepaper/wiki-images/Qt_logo.jpg",
"source":"http://doc.qt.nokia.com/whitepapers/qt-quick-tooling-whitepaper/wiki-images/Qt_logo.jpg",
});@doesn't work, nor other options (similar) that I've tried. So there is something wrong with it. After several days trying to find an example (I haven't), I think it's better to ask here what I'm doing wrong :)
So any help will be greatly appreciated!
Gerard
- from NewsFlow source code, that I am trying to play with
-
Hi,
You should supply your own image provider object. Here is the link to documentation
http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeimageprovider.html
Cheers!