Mouse lock inside window/widget
I am trying to stop the mouse from leaving the window. This is useful for first person cameras in OpenGL, as well as full screen applications with multiple monitors. I mostly am just looking to keep it inside the window, however keeping the mouse inside a widget could also be useful to know.
Re: Mouse lock inside window/widget
http://qt-project.org/doc/qt-4.8/qwidget.html
You are looking vor leaveEvent().
So: just reimplement the leaveEvent, grab your mouse pointer by its neck and put it back where it belongs, I'd say.
For that: http://qt-project.org/doc/qt-4.8/qcursor.html
But done that I never have....