Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mouse coordinates on Zoom in and Zoom out.



  • 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();
    

Log in to reply