Results 1 to 3 of 3

Thread: How pass part of the mouse events through a top-level window to the windows below

  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default How pass part of the mouse events through a top-level window to the windows below

    Good evening.
    Half of my top-level window is transparent, except for a few sites. I want to ensure that mouse events occurring on that half had passed through my application and reach of applications under him.
    I found that event->ignore() does not effect a top-level window. Does anyone know anything on which side to approach this problem?
    Thanks in advance for the tip.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How pass part of the mouse events through a top-level window to the windows below

    Half of my top-level window is transparent, except for a few sites.
    Do you mean 100% transparent (i.e by using a mask) or only partly opaque?
    If its 100% transparent, no mouse events for that widget will be cought where it is fully transparent.
    If it is only partly opaque, then you will have probably have to use an event filter.

    I want to ensure that mouse events occurring on that half had passed through my application and reach of applications under him.
    Do you really mean "application" or widgets?
    Or, do you really mean event between applications, or events between widgets (windows) in the same application?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How pass part of the mouse events through a top-level window to the windows below

    I don't think there is a general and easy approach to your problem. You will probably have to dig into the native API. Once events reach an application they are not forwarded to other applications on their own.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. 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
  2. Catching Mouse Events on Top-Level Window
    By andyp in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2009, 11:26
  3. Replies: 2
    Last Post: 21st June 2009, 07:04
  4. Pass custom events to another process
    By TTGator in forum Qt Programming
    Replies: 9
    Last Post: 14th January 2009, 23:02
  5. Replies: 4
    Last Post: 4th June 2007, 13:07

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.