I'm making a virtual environment with Qt's OpenGL widget and I want to be able to "trap" the mouse in the center of the widget. My idea was to do this:
However, widgetPos doesn't contain the top left corner of the screen as I would have hoped, so the cursor gets locked at the wrong position. Am I going about this the wrong way?Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks