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

QMenu's sizeHint does not take sections into account

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.6.3
    • GUI: Menus
    • None
    • Windows

    Description

      Using QMenu's addSection with a long text does not take the text size into account for the QMenu's sizeHint.

      The bug is in this code : qmenu.cpp:412

      When in updateActionRects(),  we have this code :

      "

      if (action->isSeparator()) { sz = QSize(2, 2); } else { ..."

      Should be :

       

      "

      if (action->isSeparator() && !isSection) { sz = QSize(2, 2); } else {"

      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
            AlGrenadine Alexandre GRANVAUD
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes