How do I resize rows with setRowHeight and resizeRowToContents in PyQt4?
问题 I have a small issue with proper resizing of rows in my tableview. I have a vertical header and no horizontal header. I tried: self.Popup.table.setModel(notesTableModel(datainput)) self.Popup.table.horizontalHeader().setVisible(False) self.Popup.table.verticalHeader().setFixedWidth(200) for n in xrange(self.Popup.table.model().columnCount()): self.Popup.table.setColumnWidth(n,150) And this works fine, but when I try: for n in xrange(self.Popup.table.model().rowCount()): self.Popup.table