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

GridLayout doesn't work correctly with a Repeater

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 5.14.1
    • Quick: Layouts
    • None
    • All

      I have a GridLayout with 3 columns and one row.

      In the first cell I have a Rectangle, in the second and third ones a Text rendered using a Repeater from a hardcoded array. Both Text items should be aligned to the right. (The second GridLayout with the blue and yellow Rectangles it's just for comparison.

      If the text has the same length in the array it is rendered correctly:

      If they have different length, the alignment is broken:

      P.S: It works if the text is wrapped around with an Item.

      I've also attached a small project that reproduces the issue.

       

        1. image-2020-03-05-17-52-12-864.png
          image-2020-03-05-17-52-12-864.png
          6 kB
        2. image-2020-03-05-17-51-14-282.png
          image-2020-03-05-17-51-14-282.png
          4 kB
        3. gridLayout.zip
          2 kB
        4. fix.qml
          1 kB
        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
            cosminmarc Cosmin Marc
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes