Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.1
-
None
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