def remove_child(self, child):
        """Remove the child from this TreeItem

        :param child: the child TreeItem
        :type child: :class:`TreeItem`
        :returns: None
        :rtype: None
        :raises: ValueError
        """
        child.set_model(None)
        if self._model:
            row = self.childItems.index(child)
            parentindex = self._model.index_of_item(self)
            self._model.removeRow(row, parentindex)
        else:
            self.childItems.remove(child)
def remove_child ( self , child ) : child . set_model ( None ) if self . _model : row = self . childItems . index ( child ) parentindex = self . _model . index_of_item ( self ) self . _model . removeRow ( row , parentindex ) else : self . childItems . remove ( child )
Remove the child from this TreeItem

        :param child: the child TreeItem
        :type child: :class:`TreeItem`
        :returns: None
        :rtype: None
        :raises: ValueError