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

Regression: Multiline plain text with implicit width does not horizontally align

    XMLWordPrintable

Details

    • 204500b6f5133a56d32799581543fbcdd4095545

    Description

      The following example illustrates the issue. Without giving the text element an explicit width, the two lines of text remain aligned left.

      import QtQuick 2.0
      
      Item {
          width: 800; height: 640
      
          Text {
              //width: 200    //uncommenting this fixes the alignment
              text: "Short Line\nMuch Longer Line"
              horizontalAlignment: Text.AlignHCenter
          }
      }
      

      Attachments

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

        Activity

          People

            mbrasser Michael Brasser
            mbrasser Michael Brasser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes