About QTableWidget's setRowCount
Hi all I have a question,
Consider I have 10 row in my QTableWidget. I put some texts in each item. Then I use
setRowCount(0);
With above code, did the items automatically deleted or we just lost the pointer to them? can't find about this in documentation
Sorry for my poor english :)
Re: About QTableWidget's setRowCount
From QTableWidget::setItem():
Quote:
Sets the item for the given row and column to item.
The table takes ownership of the item.
So the table is responsible for deleting the items it contains. The same is true of widgets added to cells.