TreeItem.hasChildren

bool hasChildren() const

Checks if this item has children.