This is the Qt Example for a "Simple Tree Model" but converted to using a QML TreeView instead of a QTreeView widget. It is using a QAbstractItemModel to represent the tree model.