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

[REG 5.11 -> 5.12] QToolButton with icon and text prematurely elides text

    XMLWordPrintable

Details

    • All
    • 25231c40489e54d57998fa44385ad832cc32b30d (qt/qtbase/5.12) 7024090e1dc7043e7a2a692ede105bcb7952781d (qt/qtbase/5.12)

    Description

      https://codereview.qt-project.org/227511/ allows text in a QToolButton to elide. However, in some cases it causes a "premature" eliding. That means that even with preferred width, the QToolButton elides its text.

      The attached QTBUG-72226.zip contains a minimal application to reproduce the issue.

      before fix:

      after fix:

      Key ingredients are:

      • QToolButton in a QHorizontalLayout
      • button has an icon
      • button has text
      • text contains a & (mnemonic)
      • toolButtonStyle is Qt::ToolButtonTextBesideIcon

      The issue was originally fount in Qt Creator's amend/commit editor (QTCREATORBUG-21551). This is how it looks like:

      before fix:

      after fix

      Attachments

        Issue Links

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

          Activity

            People

              chehrlic Christian Ehrlicher
              portale Alessandro Portale
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes