QML TreeView
Unsolved
QML and Qt Quick
-
Hi
I need to implement a QML TreeView representing some data.
The representation requires that rows have to be displayed differently - for example some rows have a checkbox some dont.
I have managed to get all rows to have a checkbox but cant understand how to style each row differently.
This is what I have so farWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") TreeView { model: myModel alternatingRowColors: false anchors.fill: parent headerDelegate: { visible: false } TableViewColumn { title: "Name" role: "display" width: 300 } itemDelegate: Item { id: itemId CheckBox { anchors.verticalCenter: parent.verticalCenter text: styleData.value } } } }
And this is what I am aiming for
Thanks
-
@GrahamLa,
@ocgltd said in QML TreeView:Sad that after 2 years no one has answered. Many parts of the solution to this question would be of interest.
This may be of interest:
https://stackoverflow.com/questions/31985972/different-delegates-for-qml-listview