Hi.
I've got a simple QTableView diplaying plain records (no tree). When I delete row should I use removeRow or takeRow, I'm a bit confused which to use, but the both seem to do the job. Thanks.
Hi.
I've got a simple QTableView diplaying plain records (no tree). When I delete row should I use removeRow or takeRow, I'm a bit confused which to use, but the both seem to do the job. Thanks.
You might be using QStandardItemModel.
removeRow() just removes the row & returns true if successes & model will delete this row items from memory (model will take ownership & deletes the items).
takeRow() will remove all the items in row from model & returns that list of items. these list of items will not get deleted from memory (model releases the ownership with the items).
Last edited by prasad_N; 27th August 2015 at 10:11.
Thanks :-)
Bookmarks