No, i didnt set QGraphicsItem::setAcceptHoverEvents() true; i can use hover events, there is no problem with them. But mouseMoveEvent doesn't work...
No, i didnt set QGraphicsItem::setAcceptHoverEvents() true; i can use hover events, there is no problem with them. But mouseMoveEvent doesn't work...
The point is: you won't get mouseMoveEvents unless you set the item to accept hover events.
I ve just tried "setAcceptHoverEvents(true)"; that didnt make any difference..What may be else?
Now, Ive tried to implement the event inside of the widget, not inside of the proxywidget..It works partially know...
Qt Code:
{ qDebug("mouseevent in widget"); }To copy to clipboard, switch view to plain text mode
I moved the cursor for 30 seconds on the screen;but there were just 2 events I could see on the console! What is that knowShouldn't that event be called every milliseconds I move the mouse?
for widgets u need QWidget::setMouseTracking to be true
setMouseTracking is already set true. The question is why is the event being called sometimes;but sometimes not?
I think, i got the problem. I should setMouseTracking(true) for central widget and all child widgets. Isn't there any direct way to make setMouseTracking(true) for all widgets on the scene?
You can set the mouse tracking on the parent widgets if ther is one item in the scene, or iterate on top child items and set it manually
Bookmarks