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

Changing the height of a positioner in a ListView causes the view to jump

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.0.0, 5.4.0 Beta
    • Quick: Other
    • None

    Description

      With the following code, press 2 to move to the yellow square. Now, every time you press Space to increase the size of the first Column, the view jumps down and then back up.

      import QtQuick 2.0
      
      ListView {
          id: root
      
          property real panelSize: 200
      
          width: 200; height: 200
      
          model: VisualItemModel {
              Column {
                  id: first
                  objectName: "column"
                  Repeater {
                      id: rpt
                      model: 1
                      Rectangle {
                          width: 80; height: 80; color: "red"; border.width: 1
                          Text { text: first.x + ", " + first.y }
                      }
                  }
              }
              Rectangle {
                  objectName: "yellow"
                  width: root.panelSize; height: root.panelSize; color: "yellow"
                  Text { text: parent.x + ", " + parent.y }
              }
              Rectangle {
                  objectName: "blue"
                  width: root.panelSize; height: root.panelSize; color: "blue"
                  Text { text: parent.x + ", " + parent.y }
              }
          }
      
          focus: true
          highlightMoveDuration: 2000
      
          Keys.onSpacePressed: {
              rpt.model += 1
          }
      
          Keys.onDigit1Pressed: currentIndex = 0
          Keys.onDigit2Pressed: currentIndex = 1
          Keys.onDigit3Pressed: currentIndex = 2
      }
      
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            bealam Bea Lam (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes