Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.5
-
None
-
Qml Runtime 6.5.1
Linux 6.3.9-arch1-1
Description
In the QTableView from QtWidgets, clicking on a cell in a table sets the current index to that cell and selects it (see attached widgets.py). However, in the TableView from QtQuick.Controls, clicking on a cell only sets the current index, the selection is cleared (see attached controls.qml).
This is stated in the documentation, but it means that the example from https://doc.qt.io/qt-6/qml-qtquick-tableview.html#selecting-items doesn't seem to work, since tapping on a cell causes no visible change, the only way to get a selection is to use Shift+arrow keys.
To fix this, either:
- Clicking on a cell should set the selection to contain only that cell, this may require a new option for backwards compatibility reasons
- Or the documentation should be clearer, and show how to get around this (e.g. onCurrentChanged: (curr, prev) => select(curr, ItemSelectionModel.Select))