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

Changing model on Tumbler when it has currentIndex == 1 creates ghost of previous current item

    XMLWordPrintable

Details

    • qtdeclarative: c14c3a1054f68886413e8698cdf67275d91d3e58

    Description

      If I change model on Tumbler, when it has 1 as currentIndex, I see ghost of previous current item.
      To reproduce, run test program and click on button.

      Also, in the test program, after model change, positions of top and bottom items change.

      Test program:

      import QtQuick 2.5
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          Rectangle {
              height: tumbler.implicitHeight
              width: tumbler.implicitWidth
              anchors.centerIn: parent
              border {
                  color: "black"
                  width: 1
              }
      
              Tumbler {
                  id: tumbler
      
                  anchors.centerIn: parent
                  model: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]
                  currentIndex: 1
              }
          }
      
          Button {
              anchors.bottom: parent.bottom
              anchors.horizontalCenter: parent.horizontalCenter
              text: "Change model"
              onClicked: tumbler.model = [ 21, 22, 23 ]
          }
      }
      

      Attachments

        1. broken.png
          broken.png
          2 kB
        2. normal.png
          normal.png
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes