QtModelUtilities
QtModelUtilities copied to clipboard
Proxy model to remove hierarchy levels
Make a proxy model that can turn a tree like
- Project
- DataSet1
- Type 1
- Elem 1_1
- Elem 1_2
- Type 2
- Elem 2_1
- Elem 2_2
- Elem 2_3
- Type 1
- DataSet2
- Type 3
- Elem 3_1
- Type 3
- DataSet1
Into a tree like
- Type 1
- Elem 1_1
- Elem 1_2
- Type 2
- Elem 2_1
- Elem 2_2
- Elem 2_3
- Type 3
- Elem 3_1
Source of the request https://forum.qt.io/topic/92477/proxymodel-to-filter-a-model-from-an-item-that-is-not-the-root-or-submodel-from-an-item
https://forum.qt.io/topic/94066/how-to-get-required-level-items-of-the-tree-in-qtreewidget
https://forum.qt.io/topic/94492/show-content-of-specific-subfolders-using-qfilesystemmodel
https://forum.qt.io/topic/71553/smarter-way-to-get-a-list-of-children-in-tree-model https://forum.qt.io/topic/97011/extracting-a-list-from-a-qabstractitemmodel