Hi:
I have add some QListWidgetItem into a QListWidget through the following codes, and the QListWidgetItem contains both QIcon and QSrting like this:
Qt Code:
  1. ui->listWidget->addItem(new QListWidgetItem(icon, fileInfo.baseName()));
  2. ui->listWidget->setIconSize(QSize(40, 40)); //设置图标大小
To copy to clipboard, switch view to plain text mode 

But when I delete the QListWidgetItem in the QListWidget, I only know the QString of the QListWidgetItem to be deleted, and I use the following:
Qt Code:
  1. QListIterator<QListWidgetItem*> i(ui->listWidget->findItems(QString("something"), Qt::MatchCaseSensitive));
  2. while(i.hasNext())
  3. {
  4. // QListWidgetItem *temp = i.next();
  5. ui->listWidget->removeItemWidget(i.next());
  6. // delete temp;
  7. }
To copy to clipboard, switch view to plain text mode 
unfortunately I failed.
Do some guys know how to delete them?
Thanks!