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

Text.horizontalAlignment is sometimes ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.7
    • 5.5.1
    • Quick: Other
    • None
    • Linux, 64 bit

    Description

      In certain case setting any alignment for Text.horizontalAlignment is ignored and it default to Text.AlignLeft.

      I could reproduce only with a test (attached) when a Loader is involved, simply putting it in a Row works as expected.
      Click on the window to switch between the horizontal or vertical layout. In horizontal layout the multiline text should be horizontally aligned.

      The problem depends on width of the text component:
      1) if width is a fixed number, it works
      2) if width is bound to implicitWidth, it doesn't work (I expect this to be the same as case 3)
      3) if width is bound to undefined, it works
      4) if width is bound to implicitWidth minus some value, it works
      5) if width is bound to implicitWidth plus some value, the text is horizontally aligned, but the whole text content is shifted to the left

      Attachments

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

        Activity

          People

            w00t Robin Burchell
            andras@kdab.com Andras Mantia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes