PDA

View Full Version : Handling mouse over event for QListWidget



Abc
22nd July 2008, 15:01
Hi,
I am using QT 4.4 on windows XP. I want to handle the mouse over evnt on a QListWidget. I have QStringList added to my widget. This QStringList comprises of strings (each has 3-4 lines). I want to change the background of the text (as if to highlight or focus the same), one line at a time, as and when my mouse moves over the same.

Please help me with any snippet that may solve the purpose.

high_flyer
22nd July 2008, 15:40
you need to reimplement mouseMoveEvent().
There you can access the list item (QListWidgetItem) and manipulate its background.

aamer4yu
22nd July 2008, 18:32
Or you can use stylesheet instead :)