My tree view displays correctly, but when I click the item in the tree I can't get the parent name.
My QML code can be found below.
TreeView {
id:treeviewID
anchors.fill: parent
model: theModel
style: styleTreeView
selection: ItemSelectionModel{
id:sel
model: theModel
}
headerVisible : true
selectionMode: SelectionMode.SingleSelection
onDoubleClicked:{
console.log("parent Name of the Item selected : ",?????)
}
TableViewColumn {
role: "name_role"
title: valueSelected
}
}