for limiting the mouse in a window -
1) Convert mouse position from global to window position (use mapFromGlobal())
2) check if that position lies within the window geometry ( Qwidget->geometry())
using these u can limit the movement
hope this helps
Bookmarks