Re: mouseMoveEvent problem
Re: mouseMoveEvent problem
No, i didnt set QGraphicsItem::setAcceptHoverEvents() true; i can use hover events, there is no problem with them. But mouseMoveEvent doesn't work...
Re: mouseMoveEvent problem
The point is: you won't get mouseMoveEvents unless you set the item to accept hover events.
Re: mouseMoveEvent problem
I ve just tried "setAcceptHoverEvents(true)"; that didnt make any difference..What may be else?
Re: mouseMoveEvent problem
Now, Ive tried to implement the event inside of the widget, not inside of the proxywidget..It works partially know...
Code:
{
qDebug("mouseevent in widget");
}
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 know:confused: Shouldn't that event be called every milliseconds I move the mouse?
Re: mouseMoveEvent problem
for widgets u need QWidget::setMouseTracking to be true
Re: mouseMoveEvent problem
setMouseTracking is already set true. The question is why is the event being called sometimes;but sometimes not?
Re: mouseMoveEvent problem
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?
Re: mouseMoveEvent problem
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