Details
-
User Story
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
I was recently using TableView, together with QML ItemSelectionModel and TapHandler inside the delegates. I found it very weird, that per default (without doing anything in the tapHandler other than putting it in the delegate) clicking on delegates updated the current index (good) and cleared the existing selection in the table (bad).
I find the idea behind such a bool which automatically works together with input handlers in delegates awesome, but I would like to be able to modify the behavior - the latter would make this feature a lot more useful. For example making the pointerNavigation bool into a flags int for Selection flags of the ItemSelectionModel would be awesome (with a default of Clear | Current to maintain the current behavior).
Some cool stuff one could implement with this:
- Use it in tables where selecting one cell of a row implicitly selects the entire row (By setting the pointerNavigation flags to Clear | Select | Rows) and same ofcourse for column selection.
- Use it in toggle selection tables (where I could make a binding to PointerNavigationFlags and set Toggle if e.g. shift is pressed (with my own logic to figure out when that is the case))
- Or not use it at all (should have a None or Disabled option) and do my own stuff in the delegate tapHandlers/table-wide handlers