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

QStyleSheetStyle::sizeFromContents Does Not Take maxIconWidth Into Account if Menu Item Is Not Checkable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Environment:
      Windows 10, VS 16.9.6
    • Platform/s:
      Windows

      Description

      Submenu indicators of a QMenu with styled items are drawn incorrectly if at least on item has an icon except the one with the longest text. In this case, the bounding rect of the longest item lacks the icon width because maxIconWidth of the style options is not taken into account. The overall width of the menu is finally given by the bounding box with the largest width.

      I guess this is also the case for normal items without submenus.

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            marvinl marvinl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes