I am implementing a QTableWidget that to display directories and files within the directories as a tree. Similar to the below:
ParentDir
├ (Main Table)
├── DirA
│ ├ (Sub-table)
│ ├── ItemA1
│ ├── ItemA2
│ └── ItemAn..
├── DirB
│ ├ (Sub-table)
│ ├── ItemB1
│ ├── ItemB2
│ └── ItemBn..
└── Dirn
Ideally, I want to have a one-column table that displays the DirA, DirB, Dirn, when I double click at row DirA, it will expand a sub-table with ItemA1, ItemA2, ItemAn.
My question is: what QWidget should I use to implement the sub-table (a one-column table expanding the Items)?