Reputation: 4062
If I add a new QTableWidgetItem to a QTableWidget, do I have to free the memory myself or is it automatically handled. For example:
ui->table->setVerticalHeaderItem(0,new QTableWidgetItem(tr("Table Item")));
How is the dynamically created QTableWidgetItem handled?
Upvotes: 3
Views: 510
Reputation: 21357
The QTableWidget
takes ownership of the QTableWidgetItem
. You do not need to delete it.
Upvotes: 4