Hi,

I have already build table view (by customizing QAbstractItemModel & QTableView).
My table view looks as below


Qt Code:
  1. Level Name Rank Sec
  2. 0 Rajesh 1 A
  3. 1 Krish 2 A
  4. 2 Ram 3 B
  5. 1 Krish 4 C
  6. 0 Krish 5 B
  7. 1 Krish 6 a
  8. 1 Krish 7 A
  9. 0 Rajesh 1 A
  10. 1 Krish 2 A
  11. 2 Ram 3 B
  12. 0 Rajesh 1 A
  13. 1 Krish 2 A
  14. 2 Ram 3 B
To copy to clipboard, switch view to plain text mode 


Now based on the level column I need to build the tree, Is it possible to re use the same model(from table view) and create tree view based on level column ?
or do I need to create separate new model for tree again. If it is possible please let me know what i need to implement for this.

Tree view : all the Level 0's are parents, followed by 1's are childs of 0's and 2's are childs of 1's.

Thanks in Advance :-)