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

The Items in the ListView is not showing when the model is changed during dragging

    XMLWordPrintable

Details

    • 5647527a8c (qt/qtdeclarative/dev) 902bbe39ef (qt/qtdeclarative/6.4) 5ab9887286 (qt/qtdeclarative/6.3) 5ab9887286 (qt/tqtc-qtdeclarative/6.3) 31d3c4bfbf (qt/tqtc-qtdeclarative/6.2) 08269077b3 (qt/tqtc-qtdeclarative/5.15)

    Description

      The Items in the ListView is not showing when the model is changed during dragging. I think ListView is looking at the contentY of the previous model after changing model data.

      You can check the issue through the attached video( Qml Runtime 2022-07-15 10-08-22.mp4 ).

      • Test Case
        1. Run below example codes
        2. Flink down a little and repeat the drag continuously
          • (Do not release the left mouse button)
      • Problem
        • The Items in the ListView is not showing
        • (recovery) The item becomes visible when you stop dragging(mouse release),
      • Expected results
        • The Items in the ListVIew should appear smooth even if the model changes during dragging.
      • Test code
        • The test code is simple.
          Change the number of models from 30 to 5 after 8 seconds through the timer.
          import QtQuick
          import QtQuick.Controls
          
          ListView {
              id: exam0
              property int dynamicModel: 30
          
              width: 450
              height: 516
          
              clip: true
              model: dynamicModel
              spacing: 4
          
              delegate: Button {
                  text: index
                  width: 450
                  height: 100
                  font.pixelSize: 40
              }
          
              ScrollBar.vertical: ScrollBar{}
          
              Timer {
                  id: testTimer
                  interval: 8000
                  repeat: false
                  running: true
                  onTriggered: {
                      console.log("onTriggered")
                      dynamicModel = 5
                  }
              }
          
          }
          

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            jonghokim Jongho Kim
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: