PDA

View Full Version : QStyledItemDelegate: not recognizing QStyle::State_MouseHover



hefeweiz3n
11th November 2010, 14:05
I have the following Problem: The delegate associated with my view won't recognize Mouse Over states. I am using Qt4.7 on Archlinux ith KDE.

The example code from this thread (http://www.qtcentre.org/threads/16446-how-to-highlight-the-Icon-in-QListWidget-when-cursor-is-over-the-Icon(not-clicked)) also doesn't work, so what is wrong? According to the info I found on the web all one needed to do was set
view.viewport()->setAttribute(Qt::WA_Hover);
How can i get the MouseOver recognized? In the example the normal Background gets painted, not however the Icon, so deep down it somehow gets recognized...