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

Items in GridView shifts to the right when using RTL layoutDirection

    XMLWordPrintable

Details

    • 6254b383309a0c3cd273264466105a7e3599a1ed (qt/qtdeclarative/dev) b2a4a61e8c (qt/tqtc-qtdeclarative/5.15)
    • Bug Fixing Candidates

    Description

      In GridView, when setting the layoutDirection to Qt.RightToLeft and cellWidth to a dynamically calculated value, all the items will shift to the right side of the view, making part of the items invisible.

      The bug is not reproducible when either layoutDirection is LeftToRight or the cellWidth is a fixed value.

      When placing the GridView in a ScrollView, dragging the horizontal scrollbar will make the items return to normal. Also, setting the layoutDirection imperatively (e.g. in Component.onCompleted) instead of declaratively can also fix the issue. However, resizing the window will make the issue come back.

      This is reproducible on all platforms.

      I've attached a simple Qt app and a short video to demonstrate the bug. It should be easy to reproduce the bug using the app.

      Attachments

        1. GridView-rtl-bug-demo.mp4
          7.74 MB
          Shveta Mittal
        2. qtbug92998.zip
          3 kB
          Shveta Mittal

        Activity

          People

            tonyl Tony Leinonen
            shmittal Shveta Mittal (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: