code: def adjust_cells(self):
          
          self.resizeColumnsToContents()
          fm = self.horizontalHeader().fontMetrics()
          names = [fm.width(s.name + ' '*9) for s in self.source_model.shortcuts]
          self.setColumnWidth(NAME, max(names))
          self.horizontalHeader().setStretchLastSection(True)
docs: Adjust column size based on contents.