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

QText2DEntity width computed by QFontMetricsF is too small

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: Qt3D
    • Labels:
      None
    • Environment:
      Windows 10 21H1, MSVC 16, x64
    • Platform/s:
      Windows

      Description

      When using multiple subsequent spaces in a string the width calculated by QFontMetrics::boundingRect is too small to fit the entire string on one line for a QText2DEntity. QText2DEntity inserts a line break and draws the fps number on the next line. If I remove all spaces (the one after the colon and the padding) the string is properly drawn on a single line. The error seems to be that the 3D text rendering requires more horizontal space than the 2D font rendering.

        

        Attachments

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

          Activity

            People

            Assignee:
            seanharmer Sean Harmer
            Reporter:
            volkerenderlein Volker Enderlein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes