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

ListView: Populate transition on opacity does not work for delegates outside of viewport

    XMLWordPrintable

Details

    • 1adbf16f2526b797a70bccf21b1400451f9d4cbb (qt/qtdeclarative/5.12)

    Description

      When delegates have initial zero opacity, populate transition does not work for items, that are outside of ListView's viewport. So, such items never become visible.

      Test case:

      import QtQuick 2.3
      
      Item {
          id: root
      
          width: 300; height: 300
      
          Component.onCompleted: listView.model = 50
      
          Item {
              anchors.fill: parent
      
              ListView {
                  id: listView
      
                  anchors.fill: parent
                  model: root.itemCount
                  delegate: Rectangle {
                      color: "lightgray"
                      opacity: 0
                      width: ListView.view.width; height: 30
                      Text {
                          anchors.centerIn: parent
                          text: index
                      }
                  }
                  populate: Transition {
                      NumberAnimation { property: "opacity"; to: 1.0; duration: 1000 }
                  }
              }
          }
      }
      

      Attachments

        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
            trollixx Oleg Shparber
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes