Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0
-
None
Description
The QHeaderView::restoreState() function does not unset an existing sort indicator if the state to restored has a sorted logical index of -1. A workaround to this problem is to call the restore function as follows:
header()->setSortIndicator(-1, Qt::AscendingOrder) header()->restoreState(state);
This ensures the sort indicator is effectively reset and relies on the state to set it again or ignore the setting. Not doing this results in the current sort indicator to persist after a state restore, which seems undesirable to me.