Consider I have two windows: window1 and window2 like below
------------------------------
| x | This is the window1 |
|----------------------------|
| |
| This window contains |
| a webview that has |
| transparent background. -|----------------|
| | x | | This is window2|
| - - - - - - - --|----------------|
| |If I click HERE | |
------------------------------ |
| I want to activate window2. |
| |
| |
| |
-----------------------------------
window1 loads a HTML file into a QWebView and there is a transparent area like described here.
Now the problem is that when I click on the transparent area the window that is under the window1 (in this case window2) is not activated. That's normal, because there is a HTML document with a transparent background.
I think that the correct way would be to make a function in C++ that would simulate a click on known coordinates under the activated window.
How can I do this in Qt?
I guess you can reimplement the virtual QWidget function:
And specify the "clickable rectangle" :