Your treemodel will index every element added to the tree.

For any given item in the tree you can get the other elements at the same level using the sibling function.

For more info take a look at the documentation for QModelIndex.