Results 1 to 4 of 4

Thread: How to detect QT Mouse events outside a application window?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2013
    Posts
    3
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: How to detect QT Mouse events outside a application window?

    I am stuck badly in this...
    I cannot implement simultaneous mouse events in 2 separate class (as per above solution) as I don't which one will be fired first and how to then inform the second mouse event one about it.
    I have a QGraphicsSceneMouseEvent running for a QGraphicsScene inside QGraphicsView. So I want to determine when a mouse event (from QGraphicsSceneMouseEvent) runs outside a QApplication window.
    Isn't their any direct function call API for this determining whether the mouse move event goes outside app window?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to detect QT Mouse events outside a application window?

    Quote Originally Posted by Danie View Post
    Isn't their any direct function call API for this determining whether the mouse move event goes outside app window?
    Yes. QWidget::leaveEvent()

    Cheers,
    _

Similar Threads

  1. How to detect hover events when mouse button is pressed
    By yagabey in forum Qt Programming
    Replies: 12
    Last Post: 26th April 2016, 10:23
  2. How to get mouse click events outside the Qt window?
    By montylee in forum Qt Programming
    Replies: 11
    Last Post: 13th July 2015, 22:55
  3. Replies: 3
    Last Post: 12th August 2012, 14:49
  4. Replies: 2
    Last Post: 4th November 2010, 11:10
  5. Catching Mouse Events on Top-Level Window
    By andyp in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2009, 11:26

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.