Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.8.0, 5.9.1, 5.9.2
-
None
-
Windows 10 & Visual Studio 2015
Description
I managed to create a widget setup which screws up completely the messaging system, so that mouse messages arrive at the wrong widgets or not at all.
In the attached example, a complex widget setup can be seen in the file bug.pro.
In a nutshell, the Win widget is embedded in a QStackedWidget and contains as children a push-button and another copy of itself. The children are disabled and have the WA_TransparentForMouseEvents attribute.
What happens is that a click on the push-button does not arrive at the parent Win object. A click on the child Win object arrives at the child even though it is totally disabled.
For the bug to happen, winId() must be called in the Win::Win constructor. Without it everything works correctly.
The example may seem a bit weird, but that's because it comes from a much larger and very complex program.