How pass part of the mouse events through a top-level window of my application to the windows below.
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.
I'm not sure if windowing systems are geared towards doing what you want. event->ignore() indeed only works for the current widget. After that, all places where that event might be delivered further should be ignoring the event and even then I'm not sure whether you will actually see the mouse event passed to the window behind your application.
Similar effect using dock in macos. When the cursor over the icon, its height increases and the like beyond the dock. In this case, the icon is superimposed on the window behind the dock. One of two things: either dynamically increase the size of dock or dock itself decides which events to skip through it.
Only one window can have the mouse events (leaving grabMouse() out at the moment). This window is the topmost one where the mouse position is.
event->ignore() only works for the current widget resp. application. If it was passed to the next application/window by the window system, you could destroy your hard disk and even not now about it, because all dialogs you happen to click on are invisible!
Are you sure, you really want to do that? Such behavior (clicking on the window on top and actually clicking a window below) could be regarded odd.