QListView/QListWidget with custom items and custom item widgets

I think you need to subclass QItemDelegate. QItemDelegate can be used to provide custom display features and editor widgets for item views based on QAbstractItemView subclasses. Using a delegate for this purpose allows the display and editing mechanisms to be customized and developed independently from the model and view. This code is taken from Qt’s … Read more