1 View
Depending on the description of reference [4], you can use Qtreeview or qlistview to display the directory tree.
2 Model
2.1 File System Model
Implement a System file directory tree mode, you can choose to use Qfilesystemmodel or qdirmodel[4],qt routines "Dir View Example" is a good example of a directory tree, as shown in the figure below:
Many times we only need to display the file name/directory list in the directory tree, without additional information. Reference [4] shows a method that displays only the 1th column names, not the other property columns.
2.2 Custom Model
If you want to customize the node content of the tree, you can use Qstandarditemmodel, as described in "Qstandarditemmodel memory Management".
Resources
[1] A Qtreeview development example of tree control in QT
[2] Tree control Qtreeview Implementation
[3] Easy picture viewing with Qfilesystemmodel and ListView
[4] Qfilesystemmodel Usage Summary
[5] From a relative path (c + + to QT)
[6] QT Traversal folder
[7] The realization of the Qt qtreewidget tree-shaped structure
[8] Qtreeview how to get the signal and get the contents of the current node when the keyboard is selected
[9] The use of QT tree control Qtreeview
[11] File browsing in QT