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

QMenu does not take into account the width of separators with text

    XMLWordPrintable

Details

    • e45d78ecb (dev), 5d5f51d3e (6.8)

    Description

      To reproduce:
      Add one item and one separator to a QMenu
      Make the text of the separator longer than the text of the normal item.
      Result:
      the width of the QMenu is not sufficient, the text of the separator is clipped.

      ----------------------------

      Long long long lon-
      Short menu item

      ----------------------------

      Add another qmenu item with the same (long) text as the separator.
      Result:
      now the width is calculated properly.

      ---------------------------------------------

      Long long long long long text
      Long long long long long text ----
      Short menu item

      ---------------------------------------------

      Qt-4.6.3
      qmenu.cpp
      306 //calc what I think the size is..
      307 if (action->isSeparator())

      { 308 sz = QSize(2, 2); 309 }

      else {

      (same thing in Qt-4.7.0-rc1)

      Attachments

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

        Activity

          People

            ervin Kevin Ottens
            n2503v alex m
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes