
Originally Posted by
d_stranz
As a workaround, you might be able to install an event handler on the overlay that relays the mouse events to the underlying widget. You'll probably need to do some coordinate mapping if the overlay is not exactly the same size and in the same position.
I should have noted that the overlay inherits QDialog. It basically has a 3x3 grid layout, the center of which is the aperture. The aperture gets moved around quite a bit, so the widget underneath varies. In order to identify it I'd probably have to use QApplication::widgetAt(const QPoint&) - which in turn uses Qt::WA_TransparentForMouseEvents.
tl;dr Not sure this leads anywhere, unfortunately.
Added after 12 minutes:
(This super smart forum combines successive posts of mine. How can I keep them separate?)
Things just got a lot stranger...
I played around on Windows which I thought works. Now, I found mouse clicks are passed through overlay/aperture even if I explicitly set
_aperture->setAttribute(Qt::WA_TransparentForMouseEvents, false);
_aperture->setAttribute(Qt::WA_TransparentForMouseEvents, false);
To copy to clipboard, switch view to plain text mode
How can this even be? 
I looked around and found
_overlay->setWindowFlag(Qt::Tool);
_overlay->setWindowFlag(Qt::Tool);
To copy to clipboard, switch view to plain text mode
but this line of code makes no difference either and I can just as well comment it out - the mouse clicks are still propagated.
Bookmarks