How to remove an item from a complex listwidget?
-
If you just want to remove the item form the list, this is enough:
@
QListWidgetItem* p = list->takeItem(index);
@
Item widget will be deleted for you here. You need to delete the item manually.If you want to completely delete the item and its widget this is enough:
@
delete list->takeItem(index);
@