Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77274

QWidgetAction widgets are not correctly hidden in menus

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.1
    • GUI: Menus
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jmk Jason Kim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes