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

GridView item tabbing order effected by scrolling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15
    • None
    • macOS

    Description

      When there is a grid with delegates that can be focused by tabbing. The direction of scrolling effects the tabbing order of the items.
      Ideally tabbing should always go to later items in the list, and reverse tabbing to earlier items. 

      Repo code is given below the repo step, this was built with 5.15.7 Qt on mac.
      To repo:
      1. Scroll down the list to roughly item 500

      2. Scroll up again to roughly item 300

      3. Click an item

      4. Press tab

      Result: The previous item is focused (it should be the next item)

      import QtQuick 2.15
      import QtQml 2.15
      import QtQuick.Controls 2.15
      
      ApplicationWindow {
          width: 640
          height: 480
          visible: true
      
              GridView {
                  id: root
      
                  model: 60000
                  anchors.fill: parent
      
                  cellWidth: 180
                  cellHeight: 30
      
                  delegate: Text {
                       text: "Text " + index
                       color: "black"
                       activeFocusOnTab: true
                       font.bold: activeFocus
                       TapHandler {
                           onTapped: parent.forceActiveFocus()
                       }
                  }
      
                  reuseItems: true
                  clip:true
              }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              joecresswell Joseph Cresswell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes