TreeItem.depth

int depth() const

Gets the depth of this item in the tree.

Returns

Depth (0 for root)