Possible duplicate: http://www.qtcentre.org/threads/1493...a-model-s-data

I have a QStandardItemModel of items where each row corresponds to a single object and each column corresponds to a property of that object. Here's an example using a student ID roster:

Qt Code:
  1. ID Gender Grade GPA
  2. 5 Male 12 3.8
  3. 4 Female 11 3.9
  4. 8 Female 12 3.5
  5. 19 Male 9 2.1
To copy to clipboard, switch view to plain text mode 
My end goal is to let the user select one of the column names from a drop-down and have a second table display an aggregate of the values. For example, if the user selected Grade from the list, the second table would display the average GPA for each grade as follows:

Qt Code:
  1. ID Gender Grade GPA
  2. 12 3.65
  3. 11 3.9
  4. 9 2.1
To copy to clipboard, switch view to plain text mode 
Or similarly by Gender:

Qt Code:
  1. ID Gender Grade GPA
  2. Male 2.95
  3. Female 3.70
To copy to clipboard, switch view to plain text mode 

Is there anything in Qt that performs that functionality? QSortFilterProxyModel seems to come close in terms of functionality, but as far as I can tell it only culls and sorts items, not summarizes them.