def METHOD_NAME(self, model):
    self._model = model
    self._model.dataChanged.connect(self.updateMaybe)
    self._model.rowsInserted.connect(self.updateMaybe2)
    self._model.rowsRemoved.connect(self.updateMaybe2)
    self.updateItems()