Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.4.0
-
None
Description
QItemSelectionModel should be enhanced to make subclassing it more flexible.
The documentation mentions that QItemSelectionModel::Current is used to modify the "current selection" layer, which is separate from the committed selection layer. However, selection() only returns the combination of both layers, and there is no way to read them separately.
The Qt source reveals that there are three private fields that deal with this: q->ranges (the committed selection), q->currentSelection (the uncommitted selection), and q->currentCommand (the combination mode for q->currentSelection).
It would be helpful if these were exposed in either the public or protected interfaces for the class.
This would allow proper handling of overriding calls to select() that include QItemSelectionModel::Current