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

Navigating a TreeView inside a ScrollView with a keyboard causes the ScrollView to incorrectly scroll

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.1
    • None
    • Linux/Wayland

    Description

      When a TreeView is placed inside a ScrollView with keyNavigationEnabled: true the ScrollView will incorrectly scroll when the TreeView is navigated. See the attached example, which is basically the "Key Navigation" example from the Table View documentation, but with the TableView replaced with a TreeView and with some extra items and a smaller window to ensure the view ends up scrolling.

      I believe this is due to QQuickTreeView::keyPressEvent calling ignore() on the key event while QQuickTableView never calls accept().  See https://invent.kde.org/qt/qt/qtdeclarative/-/blob/dev/src/quick/items/qquicktreeview.cpp?ref_type=heads#L647

      Attachments

        1. TableViewKeyboard.qml
          4 kB
          Arjen Hiemstra
        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
            awhiemstra Arjen Hiemstra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes