Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.5.1, 5.6.1, 5.9.7, 5.12.0, 5.12.1
-
None
Description
When a QPushButton is clicked, a Leave event is (or should be) delivered to the button before the button's menu is displayed. However, it has been noticed that, on occasions, the Leave event goes missing.
In the attached video (QTBUG-73954_Qt_5.12.1.mp4), it is demonstrated that, after some clicks, the Leave event is not delivered; from the button's point of view, the mouse pointer never left the widget area.
Some notes:
- The issue seems to be more easily reproducible in slower machines (e.g. it was much easier to reproduce in VMs).
- When using the same example under PyQt 5 in a VM, the issue could be reproduced 90% of the time (but it is hard to prove the direct relationship, as more components are involved).
- Also the example project shown in the demo has been attached (QPushButtonLeaveEventIssue.zip).
- Also a PyQt version of the test application has been attached (QPushButtonLeaveEventIssue.py).
Related issue: QTBUG-50340
UPDATE: It has been noticed that the issue not only affects QPushButton, but any widget. Any widget under the mouse pointer may or may not receive a Leave event when a popup window is shown.
I have attached LeaveEventGoesMissing.pyto reproduce the issue without using QPushButton.
UPDATE 2: As mentioned by dawid-s , the issue can be seen also on Windows: