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

GridView item tabbing order effected by scrolling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      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

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            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