Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.1
-
None
Description
QWidgetAction does not appear to correctly synchronize the visibility of the action's widget to the visibility of the action itself when displayed in a menu.
- If the action is initially hidden, the menu correctly skips it and the widget is not visible.
- If the action is then made visible, the menu correctly allocates a rect for it, adjust's the widget's geometry, and makes the widget visible.
- If the action is hidden again, the menu will clear its corresponding actionRect. But due to a flaw in the logic of QMenuPrivate::updateActionRects(), the widget's visibility will not be updated.
The problem is that updateActionRects() now stores an empty rect for the hidden widget action. At the bottom, while looping over all actions, any invisible action with a null rect is skipped before the call to widget->setVisible(), meaning that it will only ever show widgets but won't hide them. This is surely not intended.
Thanks in advance for your help.