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

ListView.positionViewAtEnd() does not jump to very end for some delegates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.5.1
    • None
    • OS X 10.10.4
    • macOS

      Here are two different implementations of the same UI. The code for the two is only slightly different and I expect the solutions to be quasi equivalent (maybe not pixel perfect, but as good as). The basic setup is a ListView with a delegate whose size depends on the state of the model. With a slight variation in the delegate I was able to break the behavior of positionViewAtEnd: In the version buggy.qml the method does not jump to the very end. I expect the behavior of working.qml.

      The main difference (in my eyes) is that the buggy version sets the size of the delegate itself whereas the working version only sets the size of the delegate's children.

      Also note that a variation in the number of items in the list can make the bug disappear. Not sure if that is helpful, just something I noted.

        1. buggy.qml
          2 kB
        2. working.qml
          2 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
            thomasschaub Thomas Schaub
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes