PDA

View Full Version : How to prevent an icon being highlighted?



Stobie
28th January 2010, 01:30
I have a listwidget with items which have icons. When the item is selected both the text and the icon are highlighted. My problem is that when the icon is highligted it just goes entirely black because im using only two colours. Is there a way to prevent the icon from being selected?
Thanks

wysota
28th January 2010, 10:24
Provide your own item delegate where you will not take selection into consideration for the icon. Alternatively provide a QIcon object to your item which will contain an appropriate pixmap for the selected state.