PDA

View Full Version : Mouse coordinates on Zoom in and Zoom out.



rohit1729
7th August 2019, 11:12
I've a xy axis grid in OpenGL as central Widget. I want to match the coordinates(x,y) defined in the xy axis with the mouseMoveEvent() when hovering. Also coordinates should change while zooming in or out relative to OpenGL viewport. How do I acheive this?

I'm currently getting x and y coordinates by using:



int x = eventMove->pos().x();
int y = eventMove->pos().y();