I have a TreeModel that is displayed in a tree View. I also have a proxyModel that sets its source to the TreeModel and then gets displayed in a table view. The problem I am having is only the parent nodes are getting displayed in the table view.

My tree looks like the following:

parent1
| |_Child1_1
| |_Child1_2
|
parent2
| |_Child2_1
| |_Child2_2
|
parent3

My table looks like:
parent1
parent2
parent3

I would like to have it look like:

parent1
Child1_1
Child1_2
parent2
Child2_1
Child2_2
parent3

Here is a brief snipit of how I set everything up
Qt Code:
  1. TreeModel *model = new TreeModel(headers, file.readAll());
  2. treeView->setModel(model);
  3.  
  4. mProxyModel = new MySortFilterProxyModel(model);
  5. mProxyModel->setDynamicSortFilter(true);
  6. mProxyModel->setSourceModel(model);
  7.  
  8. this->tableView->setModel(mProxyModel);
  9. this->tableView->setSortingEnabled(true);
  10. this->tableView->sortByColumn(0, Qt::AscendingOrder);
To copy to clipboard, switch view to plain text mode 

Does anyone know how I can go about displaying the children nodes in the table?