I've a list of QListWidgetItem in QListWidget(Hor scroll bar is there as num of items is huge). Each QListWidgetItem contains a QPixmap as a data(scaled down to some random value). My requirement is when a QPixmap is clicked that should be highlighted(rounded rect of brushwidth 10). I'm delegating each QListWidgetItem to a QItemDelegate. I've couple of questions here.
How to Paint the rounded rect of QPixmap when the corresponding QListWidgetItem is selected?
The above mentioned paint event should occur when QPixmap is clicked(not in the other parts of QListWidgetItem). As QPixmaps are of different sizes, top and bottom part of QPixmaps in QListWidgetItem will be empty and clicking there also will trigger the ItemDelegate. How to get rid of this selection?