grizzancs
grizzancs

Reputation: 397

QWidget in delegate: no repaint upon mouseover, therefore MouseOver state cannot be checked

It does work on Linux+KDE, but not on Windows/OSX/Linux + XFCE.

I have a list view, the items are custom widgets, and the delegate for the list view's items does not get paint() calls if mouse is over the elements.

Tried to simulate the event via css ( :hover ), but it seems it is not working for QWidgets.

Am I missing something, or it's really a feature missing on platforms other than KDE?

Upvotes: 0

Views: 440

Answers (1)

Chris
Chris

Reputation: 17535

You probably need to turn on mouse tracking.

QWidget::setMouseTracking(bool)

Upvotes: 3

Related Questions