Solved How to change the color of Item in QlistWidgetitem when clicked on the button and add a small icon which show that it is image or videos.
-
Hi everyone, I have a question How to change the color of Item in QlistWidgetitem when clicked on the button and add a small icon which show that is it an image or videos. see the image below
-
Hi,
One way is to create a custom QStyledItemDelegate and paint your additional icons after letting the standard rendering happen.
-
Another way would be marking the item as selected and then adding different styling on the stylesheet for selected items.