def __init__(self, root, parent=None):
        """Initialize a new tree model with the given root treeitem

        :param root: the root tree item. The root tree item is responsible for the headers.
                     A :class:`ListItemData` with the headers is suitable as data for the item.
        :type root: :class:`TreeItem`
        :param parent: the parent for the model
        :type parent: :class:`QtCore.QObject`
        :raises: None
        """
        super(TreeModel, self).__init__(parent)
        self._root = root
        self._root.set_model(self)
def __init__ ( self , root , parent = None ) : super ( TreeModel , self ) . __init__ ( parent ) self . _root = root self . _root . set_model ( self )
Initialize a new tree model with the given root treeitem

        :param root: the root tree item. The root tree item is responsible for the headers.
                     A :class:`ListItemData` with the headers is suitable as data for the item.
        :type root: :class:`TreeItem`
        :param parent: the parent for the model
        :type parent: :class:`QtCore.QObject`
        :raises: None