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

ListView is not centered on the current element at the start

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.2
    • None
    • Linux/X11

    Description

      I created a horizontal list, centered along the window, and set up so that the selected element was centered in the list. 

      If set currentindex != 0, and at the same time, the ListView size is not explicitly set (by numbers), then centering on this element does not occur at the start of the application. If then change the size of the window, or click somewhere in the list, the problem disappears, current item is centered.

      Expected

      Observed

       

      MRE: https://gitlab.com/golubevan/minimalqml/-/tree/mre-userlist-not-moving?ref_type=heads

       

      P.S. In my distro, update occurred 6.7.2 -> 6.8.2 and the problem arose with my app. But I just found out that for MRE the problem is reproduced also in 6.7.2, so I continue to examine this.

      Attachments

        1. expected.png
          expected.png
          8 kB
        2. observed.png
          observed.png
          8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            golubevan Anton Golulbev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes