You mean you want to display in the tree view aggregated data of the same data source as the one displayed in the table view? I suggest wrapping the original model into a proxy model (QAbstractProxyModel) then.