PDA

View Full Version : mouseMoveEvent receiving zero's



JohnTh
11th September 2009, 18:20
Hi,

I am very early on the learning curve with Qt, andhave run into an oddity with mouse event handling.

I have constructed a class based on QGLWidget. The class includes 3 mouse event handlers
- mousePressEvent
- mouseDoubleClickEvent
- mouseMoveEvent

I can see that all of these functions are being called upon the given events, the PressEvent and DoubleClickEvent work fine, but the event data received by the mouseMoveEvent seems to be all zeros e.g. event->x() event->y() and event->button() all return zero.

Do I have to do anything different to get 'real' event data into the mouseMoveEvent?

Thanks ...

JohnTh
11th September 2009, 18:27
... first post was slightly hasty ... :o

the mouseMoveEvent is receiving valid positions, but button() always returns 0, is this expected?

JohnTh
11th September 2009, 18:31
:o
... so now I know to read the documentation (which I am impressed with), and call buttons() to get the current button state.

Thanks for reading!