Results 1 to 2 of 2

Thread: Mouse lock inside window/widget

  1. #1

    Default 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.

  2. #2
    Join Date
    Jan 2012
    Dortmund, Germany
    Thanked 10 Times in 8 Posts
    Qt products
    Windows Android

    Default Re: Mouse lock inside window/widget
    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:
    But done that I never have....

Similar Threads

  1. Replies: 2
    Last Post: 13th December 2012, 14:56
  2. Replies: 1
    Last Post: 14th July 2012, 09:59
  3. Replies: 2
    Last Post: 2nd January 2012, 00:22
  4. Mouse move inside control/Widget
    By squidge in forum Newbie
    Replies: 0
    Last Post: 27th September 2009, 17:56
  5. How to embed coin widget inside qt window?
    By jwieland in forum Qt Programming
    Replies: 2
    Last Post: 24th February 2009, 16:50


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.