Suppose I have a pyqt4 table widget, for example:
self.table = QtGui.QTableWidget(3,4)
With self.table.clear()I can delete the entire contents of the table. However, how can I delete all the cells in a table, not just the content?
self.table.clear()
Alternatively, you can set the number of rows and columns:
self.table.setRowCount(0) self.table.setColumnCount(0)
Not tried, but you can try:
for i in reversed(range(self.table.rowCount())): self.table.removeRow(i)