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

[Regression] Populate animation on model assignment moves viewport

    XMLWordPrintable

Details

    • 705e80b702d752633828be9ac9467090e6541c66 (qt/qtdeclarative/5.14)

    Description

      The following example demonstrates the issue. At startup it will run a populate animation. This animation is the same in 5.9.3 and 5.9.4. After it finishes, you can click anywhere to change the model and trigger the animation again. This time there is a difference between 5.9.3 and 5.9.4. The animation at startup and when clicking should be identical. "QQuickList/GridViewPrivate::fixupPosition: don't set moveReason" 96ec0ab8f0b2e53eff6e1887aff7e51601821845 https://codereview.qt-project.org/#/c/211935/ is the commit that changed the behavior.
       

      import QtQuick 2.0
      
      Item {
          width: 400
          height: 400
      
          ListView {
              id: view
              anchors.fill: parent
      
              model: 4
              highlightRangeMode: ListView.StrictlyEnforceRange
      
              delegate: Rectangle {
                  color: index % 2 ? "green" : "orange"
                  width: parent.width
                  height: 50
              }
      
              populate: Transition {
                  SequentialAnimation {
                      NumberAnimation { property: "y"; from: 100; duration: 2000 }
                  }
              }
      
              onContentYChanged: console.log(contentY)
          }
      
          // click to see different behavior
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  view.model = 5
              }
          }
      }
      

      Attachments

        Issue Links

          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
              mbrasser Michael Brasser
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes