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

QML ListView doesn't receive tab focus

XMLWordPrintable

      Consider the following code

      import QtQuick
      import QtQuick.Layouts
      import QtQuick.Controls
      
      ApplicationWindow {
          width: 500
          height: 500
      
          ColumnLayout {
              anchors.fill: parent
              Button {
                  text: "Hello"
              }
              ListView {
                  model: 4
                  Layout.fillWidth: true
                  Layout.fillHeight: true
                  delegate: ItemDelegate {
                      text: "Foo"
                      width: ListView.view.width
                  }
              }
              Button {
                  text: "Hello again"
              }
          }
      } 

      When pressing Tab the focus jumps between the two buttons, completely skipping the ListView. This makes it impossible to keyboard-navigate the list content.

      This can be worked around by manually adding activeFocusOnTab: true to the ListView. That should be the default and not needed to be specified on every ListView

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes