QTreeView and QAbstractItemModel
问题 I'm new to Qt and I'm trying to make a simple tree based on a flat (or from a sqlite table) file paths list (not from FS) like this: C:\Parent1\Child1\Leaf1.jpg C:\Parent1\Child1\Leaf2.jpg C:\Parent1\Child1\Leaf3.jpg C:\Parent1\Child2\Leaf1.jpg C:\Parent1\Child2\Leaf2.jpg C:\Parent2\Child1\Leaf1.jpg C:\Parent2\Child1\Leaf2.jpg ... D:\.... ... I'd like to display this as a tree view (e.g. a file explorer). I looked into QAbstractItemModel but I have some difficulties to build the tree. My idea