Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-11099

Consider using 'fontSizeMode: Text.Fit' as default for text

    XMLWordPrintable

Details

    Description

      Consider using 'fontSizeMode: Text.Fit' as default for text

      QtQuick does support fitting the text size to the bounding box.

       Text {
              minimumPixelSize: 12
              font.pixelSize: 82
              id: text1
              x: 588
              y: 419
              width: 88
              height: 77
              text: qsTr("Text")
      
              fontSizeMode: Text.Fit
          }
      

      In this case resizing the bounding box in the 2d editor will resize the text.

      Note that minimumPixelSize: 12 and font.pixelSize: 82 is required for this to work and defines the minimum/maximum.

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            thohartm Thomas Hartmann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes