PyQt5 QTableWidget with sub-table

Viewed 22

I am implementing a QTableWidget that to display directories and files within the directories as a tree. Similar to the below:

similar result widget

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)?

0 Answers
Related