(self, model)
Set the model for the view.

        :type model: QAbstarctItemModel.
Set the model for the view.
Set the model for the view .
def setModel(self, model):
        """Set the model for the view.

        :type model: QAbstarctItemModel.
        """
        if self._model is model:
            return

        if self._model is not None:
            self.__disconnect(self._model)

        self._clear()
        self._model = model

        if self._model is not None:
            self._initialize(model)
            self.__connect(model)
def setModel ( self , model ) : if self . _model is model : return if self . _model is not None : self . __disconnect ( self . _model ) self . _clear ( ) self . _model = model if self . _model is not None : self . _initialize ( model ) self . __connect ( model )