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

How to getting QGLWidget response Mouse/Keyboard events like QWindow, unconditionally, Mouse Move event.



  • The answer is:
    @
    //So that the mouse move event are tracked by QGLWidget.
    setMouseTracking(true);
    //So the keyboard event are responded.
    setFocusPolicy(Qt::StrongFocus);
    @


Log in to reply