code: def resize_to_contents(self):
          
          QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
          self.resizeColumnsToContents()
          self.model().fetch_more(columns=True)
          self.resizeColumnsToContents()
          QApplication.restoreOverrideCursor()
docs: Resize cells to contents