Ok, I see. But this is not a matter of the view than rather of the model. The model must provide the functionality of grouping. The view only displays the content of the model. If the model supports all actions you want, you have to connect the different view signals to the corresponding model slots which will alter the model data.
There is no ready to use solution in Qt for your requirement as far as I see.
See also QSortFilterProxyModel.
Bookmarks