Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15, 6.1.0 Beta3
-
None
-
-
e8b3d35a18e7e4cf6543868d89d6060c90314f39 (qt/qtbase/dev) 631a02bc0f3e993683c059ddc145e36ceb860d86 (qt/qtbase/6.2) 39817d0f3b20822cee91c55e54aae4d6289b105d (qt/qtbase/6.1)
Description
Found this bug on a stackoverflow post.
The selection behaves different depending on whether a row is selected by clicking on the vertical header or by clicking the cell. This is due to the fact that QTableViewPrivate::selectRow() is using an own variable to remember the start of the selection (rowSectionAnchor) whereas QAIV is using currentSelectionStartIndex.
To reproduce to issue execute the attached testcase. Then do the following steps:
- click on the 2nd header entry - the column is selected
- press and hold shift and click on the header on the 3rd column - 2nd and 3rd columns are selected
- press and hold shift and click on the cell in the 4th column - now surprisingly the 2nd column gets deselected and only the 3rd and 4th column are selected
- press and hold shift and click the header on the 5th column and suddenly all 4 columns (2-5) are selected