Qt Snippet: Remove all rows from QTableWidget
Usually for Qt list widgets the method clear() remove all the rows currently showed in the control. However, also if present, this call doesn't work for QTableWidget control. If you want to remove all the rows from QTableWidget you need to simply set the number of rows to zero as follow:
MyTable->setRowCount(0);
This will have same effect of clear() and remove all rows.
Comments
Post a Comment