I have a model in C++ that is used in my Qml file. Its working fine, but I have problems showing the decoration. How can I display an icon in qml? I searched the documentation and the web, no success. ImageItem wont work either.
I have a model in C++ that is used in my Qml file. Its working fine, but I have problems showing the decoration. How can I display an icon in qml? I searched the documentation and the web, no success. ImageItem wont work either.
You mean something like Qt:ecorationRole in widget based views?
The easiest way is to have a role that returns the image's file name and then use an Image element using that as its source.
Cheers,
_
Bookmarks