Re: Too few MouseMoveEvents
Why not setting mouse tracking directly to your QGraphicsView?
has your viewport something special?
Re: Too few MouseMoveEvents
No it does not. But by reading thru the NET it seemed like the 'way to do it'.
Anyways setting mousetracking=true directly on the QGraphicsView achieves the same effect. Rare move events.
Edit: I think I'm just not getting any events when the cursor is in the graphicsScene which is inside the graphicsview...... Only right on the crack when leaving the whole window.
I just subclassed QGraphicsScene and implemented mousemoveevent but it isnt getting called... strange!
Re: Too few MouseMoveEvents
Hello, I was experiencing the same(similar) problem.
In my case I have a Widget subclassed from QFrame. Since I want to be able to re-size the Widget, i decided to handle the mouse movements in order to set the proper cursors when hovering the edges, but at certain mouse speeds it just kept the re-size cursors even though the mouse was moving inside the widget.
That's when i noticed that you must enable mouse Tracking for all relevant Widgets, so i guess in your case you also have to enable the mouse tracking for your graphics elements.
Greets and hope this helps.
Eric
Re: Too few MouseMoveEvents
Do you get all the needed events if you hold the mouse button pressed?
Re: Too few MouseMoveEvents
For receiving frequent MouseMove events is it necessary that mainwindow should have its centralWidget should be of type QGraphicsView ?. In my application the central Widget is if type QWidget, I am unable to receive frequent mouseMoveEvents in mainwindow even after settings mouse tracking.
Can we not get mouseEvents without making use of QGraphicsView class ?
Re: Too few MouseMoveEvents
Quote:
Originally Posted by
srinirao
Can we not get mouseEvents without making use of QGraphicsView class ?
Sure we can.