How to remove selected items from a QListWidget
?
I have tried write the following code, but it does not work.
QList<QListWidgetItem*> items = ui->listWidget->selectedItems();
foreach(QListWidgetItem item, items){
ui->listWidget->removeItemWidget(item);
}
item
to*item
. but still doesn't want to remove the items or any item. – Cobia