Your example is a QTreeView. It seems the right way to go, but I don't really understand what you exactly want to achieve. Could you be a little bit more elaborate with same simple example of your data. (especially what do you want to group and how should it look like)