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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.