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

QFontMetrics::tightBoundingRect() broken on HighDPI displays

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.2
    • GUI: Text handling
    • None
    • Windows 10

      Screen with 3840x2160px (200% setting in the OS)

    Description

      In my debugged case, the QFontMetrics::tightBoundingRect() returned 53 pixels width but QFontMetrics::boundingRect() only returned 17.

      The value should normally be similar. I use it to scale down text on widgets so that the width  of a string fits (height would be easy with pixelSize instead of pointSize but width is not).

      Obviously that did not work. On normal displays, it works fine.

       

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mmsattler Hendrik Sattler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes