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

QFontMetrics::horizontalAdvance() does not seems to give correct value

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      992a318d39 (qt/qtbase/dev) 992a318d39 (qt/tqtc-qtbase/dev) 763fb35d9d (qt/qtbase/6.4) 763fb35d9d (qt/tqtc-qtbase/6.4) 71be528e92 (qt/tqtc-qtbase/6.2) a067ae3d76 (qt/qtbase/6.3) a067ae3d76 (qt/tqtc-qtbase/6.3) 71be528e92 (qt/tqtc-qtbase/6.2.5)

      Description

      To display text in a grid and to determine font for the  text QFontMetrics::horizontalAdvance() is being used to calculate stretch needed for view. But this seems that horizontalAdvance() is not giving right value which leads to cut off text, if view is vertically resized to small.

      This problem happens only on Mac. Windows and Linux works fine.

      Attached example reproduces this.

      Just build build and run with Qt5.15.8 or 6.3 and resize vertically to see the issue.

       

        Attachments

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

          Activity

            People

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            irfan.omair@digia.com Irfan Omair
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes