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

Changing model on Tumbler when it has currentIndex == 1 changes positions of top and bottom item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 5.6.0 Beta, 5.7.0
    • None
    • Mageia Linux Cauldron, x86_64, gcc 5.3.1

      If I change model on Tumbler, when it has 1 as currentIndex, positions of top and bottom items change.
      To reproduce, run test program and click on button.

      Test program:

      import QtQuick 2.5
      import QtQuick.Controls 2.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 = [ 19, 20, 21, 22, 23 ]
          }
      }
      

        1. 5_items.png
          5_items.png
          3 kB
        2. broken.png
          broken.png
          2 kB
        3. calendar_5_hours.png
          calendar_5_hours.png
          9 kB
        4. normal.png
          normal.png
          1 kB
        5. time_tumbler.png
          time_tumbler.png
          3 kB
        6. tumbler.gif
          tumbler.gif
          15 kB
        7. tumblers.png
          tumblers.png
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mitch_curtis Mitch Curtis
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes