Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QListView hover event?

Tags:

qt

qt4

I want to do something when a particular list view item is hovered over. I tried the entered(QModelIndex) signal, but it does not seem to be emitted when the cursor is moved over the items (even though they are highlighted when the cursor moves over them). Is there a different signal to indicate this? I only see activated(), clicked() and pressed() here http://qt-project.org/doc/qt-4.8/qabstractitemview.html#signals that seem relevant.

like image 444
David Doria Avatar asked Mar 05 '12 20:03

David Doria


1 Answers

Ah, there is a mouseTracking property of the QListView that has to be set to true, then the entered() behaves as I would expect.

like image 171
David Doria Avatar answered Sep 28 '22 07:09

David Doria