- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
P2: Important
 - 
    6.6.3, 6.7.3, 6.8.0 Beta3
 - 
    None
 - 
    MSVC 17.11.1
 
- 
        
 - 
        40bde8a57 (dev), cd528d81f (6.8)
 
A QWidget inside a QMenu using QWidgetAction does not always receive enterEvent and leaveEvent.
What I did :
I implemented a custom widget to add inside a QMenu using QWidgetAction.
I wanted this widget to have a darker background on mouse hover.
I implemented enterEvent and leaveEvent to achieve this.
What I expected to happen :
When my mouse leaves a widget and enters another one, I expect the widget my mouse leaves to receive a leaveEvent and the widget it enters a enterEvent.
What happened instead :
This works most of the time, but for some reason sometimes an item does not receive an enterEvent or a leaveEvent, resulting in :
- an item that is not hovered anymore still having a darker background
 - an item that is hovered not having a darker background
 
Additional informations :
It's not related to my custom widget implementation. This bug is reproductible with any widget. Replacing my widget by a QPushButton will result in the button sometimes not receiving mouse leave events and staying hovered.
- resulted in
 - 
                    
QTBUG-131001 QWidget::childAt returns empty children
-         
 - Closed
 
 -         
 
| For Gerrit Dashboard: QTBUG-128391 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 586291,4 | QWidgetWindow: fix enter/leave events not sent due to fractional scaling | dev | qt/qtbase | Status: MERGED | +2 | 0 | 
| 587435,2 | QWidgetWindow: fix enter/leave events not sent due to fractional scaling | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |