Custom column order in tree view
Moved
Unsolved
QML and Qt Quick
-
I want to achieve this tree view in QML:
The problem is:
- How to have branch delegate (expand/collapse icon) as the last column
- How to add a custom column before items, i.e. as the first column
As far as I test, in QML
TreeView
:- Branch delegate is located as the first column, not the last one
- Adding column to the end is straight forward, but how to add a custom column as first column?
TreeView { model: cppScene.sceneModel // ... style: TreeViewStyle { branchDelegate: Item { // ... // ... The very first column contains branch delegate } } TableViewColumn { title: qsTr("Entities") role: "name" // ... adding column to the end is straight forward } TableViewColumn { // ... // ... adding column to the end is straight forward } TableViewColumn { // ... // ... adding column to the end is straight forward } }
An example would be helpful.