Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
4.3.3, 5.4.0 Beta
-
None
-
bec1854cc023fb705319c582a636d5f484adafcc
Description
When setDynamicSortFilter() is set to true, then QSortFilterProxyModel resorts incorrectly when data changes on roles that are not the sort role. Changing any other role should not change the sort order.
Take for example a two column table where DisplayRole is the
sort role:
a | 0
b | 1
b | 2
b | 3
z | 4
If the row "b|2" changes it's color for some reason it is removed from the table and then re-inserted as a new row. This causes the row to go below it's "like" rows and the arragement is changed to:
a | 0
b | 1
b | 3
b | 2 (this row incorrectly moved)
z | 4
Attachments
Issue Links
- is duplicated by
-
QTBUG-37758 QStandardItem moves around when checked from a QTableView with a QSortFilterProxyModel
-
- Closed
-
- relates to
-
QTBUG-60570 QSortFilterProxyModel: incremental insert is not stable
-
- Reported
-
-
QTBUG-3061 QTreeWidgetItem::setIcon() causes a sort, however the sorting is not correct for the view as it just moves the item to the top
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-1548 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
99930,3 | QSortFilterProxyModel: keep the sorting on unrelated changes | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |
189066,5 | QSFPM optimization in dataChanged: don't re-sort if the order didn't change | dev | qt/qtbase | Status: MERGED | +2 | 0 |