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

Unloading delegates in ListView breaks initial tab chain order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 5.15.2
    • None
    • Windows

    Description

      I think one generally wants the tab focus chain to stay in the initial order.
      Without designer, I'm unable to decide the order, but I can rely on the default option that is the order of construction.

      However, when items in a ListView get unloaded, it changes this default tab chain order.

      The new reuseItems-feature makes the tab order chain even more unreliable; the tab order at startup is already in a random order.

      import QtQuick 2.15
      import QtQuick.Window 2.15
      import QtQuick.Layouts 1.15
      
      Window {
          id: mainWindow
      
          width: 640
          height: 800
          visible: true
          title: qsTr("Hello World")
      
          ListView {
              anchors.centerIn: parent
              height: 200
              width: 100
      
              model: 20
              cacheBuffer: 40 // to ensure delegates get unloaded more quickly
      
              delegate: TextInput {
                  activeFocusOnTab: true
                  text: "delegate "+index
              }
          }
      }
      
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            rjmsilf Robert Silfhout
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change