QListWidget has a member named clear (). Documents for this method:
void QListWidget::clear () [slot] Removes all items and selections in the view. Warning: All items will be permanently deleted.
How can I avoid all deleted items? I just want to clear the contents of the lists so that I can re-populate it with different data (however, I want the data that was in it to be displayed again if the user wants it).
source share