-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.10
-
None
See https://codereview.qt-project.org/c/qt/qtbase/+/672138, moving discussion here for better traceability.
The current QMenuBar implementation does not match how the windows 11 style needs it's states.
The first click opens the popup, moving the mouse to another entry show the popup of this. This is fine except that the state State_Sunken is set, no matter if the left mouse button is still pressed or not. This seems to be used for the windows style to draw a sunken frame but is not feasable for the windows 11 style because there are 3 states:
- normal
- hover
- pressed
There is currently no way to fix this as it would break other styles so we ended up with a check for the left mouse button in the windows 11 style:if (mbi->state.testFlag(State_Sunken)) newMbi.state.setFlag(State_Sunken, qApp->mouseButtons().testFlag(Qt::LeftButton));
But we still need to get the hover state which is done here: https://codereview.qt-project.org/c/qt/qtbase/+/672138 - it's not that trivial because the popup is stealing the mouse release event so the QMenuBar does not get a redraw.
This all fixes the open popup problem but we don't get a pressed state during closing of the poup yet.