Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.2
-
None
Description
Add a QTableWidget, single selected, row selected, add some rows, such as 10 rows.
Select 1st row which is index as 0, then removeRow(0), on the UI, the former 1st row disappears, the former 2nd row becomes the current 1st row which is selected. But if use QTableWidget::selectedRanges() or QTableWidget::selectedItems() to check the row index, it still is 1, which is expected to be 0. If you click that 1st row by mouse, result doesn't change.
You need to select another row then select 1st row, QTableWidget::selectedRanges() or QTableWidget::selectedItems() will return index 0 as the selected row index.
Attachments
Issue Links
- duplicates
-
QTBUG-61614 Behavior of selectionChanged() on removing first of two rows
- Reported