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

ListView cacheBuffer: overshooting flickable bounds not working when using asynchornous Loader delegates which change height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.3.0
    • None
    • Ubuntu 14.10

      When using Flickable.DragAndOvershootBounds boundsBehavior with a cacheBuffer and changing a delegates height after it's been created, if you flick past the end of the listview, it adjusts back before the end rather than at the end.

      using boundsBehaviour: Flickable.StopAtBounds doesn't show the same problem.

      import QtQuick 2.1
      
      ListView {
          model: 50
      
          width: 200
          height: 300
      
          // Only cache some of the delegates
          cacheBuffer: height * 2
          interactive: true
      
          delegate: Loader {
              id: loader
              asynchronous: true
              width: ListView.view.width
      
              sourceComponent: Component {
                  Rectangle {
                      Text {
                          text: "menuItem" + index
                          anchors.fill: parent
                      }
      
                      anchors { left: parent.left; right: parent.right }
                      height: 40
                      color: Qt.rgba(Math.random(), Math.random(), Math.random(), 0.4)
      
                      Component.onCompleted: height = 60
                  }
              }
          }
      }
      

        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
            dednick Nick Dedekind
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes