TreeViewDelegate is last child
-
Hi!
I use TreeView and TreeViewDelegate .
How I can know that TreeViewDelegate is last child at he parent?
This parameters can help only if parent don't expandedconsole.log("-----------------------") console.log("----parentChilds", parent.children.length) console.log("-----row", row) console.log("-----index", index) console.log("-----modelIndex", treeView.index(row, column).parent) console.log("-----parent childs", treeView.model.rowCount( treeView.index(row, column).parent )) console.log("-----realRowParent", rowAtIndex(treeView.index(row, column).parent)) console.log("-----realRow", row - 1 - rowAtIndex(treeView.index(row, column).parent)) console.log("-----isItemLastInListAndInDepth", isItemLastInListAndInDepth) console.log("----isItemLastInList", isItemLastInList) console.log("----rowCountOfItem", rowCountOfItem) console.log("----realRow + 1", realRow + 1)
And it's can help only for small tree
var countRow = 0 for (var i = rowAtIndex(treeView.index(row, column).parent) + 1; i < row; i++) { if (depth === itemAtIndex(treeView.index(i, column)).depth) { countRow++ } } console.log("-----countRow", countRow)
Or how I can get last row child for parent?
-