Hi,
I want to insert at the beginning of a row of my QListView a little styled line as decoartion instead of the classic colored icon...is there a simple trick to complete this task or I've to use QItemDelegate approch?
Hi,
I want to insert at the beginning of a row of my QListView a little styled line as decoartion instead of the classic colored icon...is there a simple trick to complete this task or I've to use QItemDelegate approch?
You can either provide a custom delegate or make your styled line an icon and set it as decoration so that the default delegate can render it.
The line style is editable by the user so it's impossible to create an icon for each line color/width/style combination...I think its better to create dynamically a decoration instead the standard icon decoration inserted through Qt:ecorationRole, or an item representing the style line...both using a custom delegate.
Bookmarks