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

GridView key navigation: viewport doesn't update to last row/column when key is held down

    XMLWordPrintable

Details

    Description

      import QtQuick 2.0
      
      Rectangle {
          width: 300; height: 400
          color: "white"
      
          ListModel {
              id: appModel
              Component.onCompleted: {
                  for (var i=0; i<100; i++) {
                      appModel.append({'name': 'blah ' + i})
                  }
              }
          }
      
          Component {
              id: appHighlight
              Rectangle {
                  width: 50; height: 80; color: "lightsteelblue"
                  z: 10; opacity: 0.8
              }
          }
      
          GridView {
              cellWidth: 50; cellHeight: 50
              focus: true
              anchors.fill: parent
              highlight: appHighlight
              model: appModel
              delegate: Rectangle {
                  width: 50; height: 50; border.width: 1
                  Text { text: index }
              }
          }
      }
      

      If the up/down key is held down, the highlight will move correctly until the second last row. Once it gets there it moves past the visible items and the viewport does not move with it, so the highlight simply slides out of view.

      Attachments

        For Gerrit Dashboard: QTBUG-20408
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes