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

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

      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

        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
            awhiemstra Arjen Hiemstra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes