def set_model(self, model):
        """Set the model the item belongs to

        A TreeItem can only belong to one model.

        :param model: the model the item belongs to
        :type model: :class:`Treemodel`
        :returns: None
        :rtype: None
        :raises: None
        """
        self._model = model
        for c in self.childItems:
            c.set_model(model)
Set the model the item belongs to

        A TreeItem can only belong to one model.

        :param model: the model the item belongs to
        :type model: :class:`Treemodel`
        :returns: None
        :rtype: None
        :raises: None