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

Text is not aligned properly when resized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.2.0, 5.9.1
    • None

      I ran into a problem where Text was not being drawn in the correct position when horizontally aligned center or right. I've attached a simple QML file that reproduces the issue.

      It seems like it might be related to the width changing not triggering a redraw. The workaround I am using currently involves calling doLayout() when the width of the Text changes.

      Also note that when the view is instantiated, the text is not aligned center despite having a width set. Then once the text is changed and a redraw happens, it is centered from that point forward. This is why I used a multi-line text value.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            leonard777 Corey Pendleton
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes