code: def change_type(self, func):
          
          model = self.model()
          index_list = self.selectedIndexes()
          [model.setData(i, '', change_type=func) for i in index_list]
docs: A function that changes types of cells.