Is there a way to change the icon of an element in a QListView
after it has been displayed?
I can't find a way to do a setData
with the DecorationRole
(the role used for the icon).
The model used is a custom QFileSystemModel
, but the default implementation is only good for the EditRole
so to change the name of the item.
I'm don't know how the the overridden setData
can be done.
The goal is to change the icon when the mouse is over the item (through mouseMoveEvent
)