QStyledItemDelegate - mouse hover?
-
wrote on 25 Sept 2019, 19:20 last edited by
Hey
Like topic says, how can I get mouse Hover event/mouse position to check if I want to change cursor/highlight stuff etc etc?
TIA
-
Hi
First check what mouse events comes in
https://doc.qt.io/qt-5/qabstractitemdelegate.html#editorEventIt says it gets mouse events but not which.
-
Hi
First check what mouse events comes in
https://doc.qt.io/qt-5/qabstractitemdelegate.html#editorEventIt says it gets mouse events but not which.
wrote on 26 Sept 2019, 02:20 last edited by Dariusz@mrjj I'm not getting any move/hover events in that function.
I don't edit anything yet to get it I think. I'm drawing 3 rects in paint() function and now I'd like to highlight each rect when mouse hover over it.
EDIT. it looks like I had to view.setMouseTracking(True) to get the event in delegate o.O
But it does not fire on mouse enter/leave action sigh. :D
3/3