I have a table which has below data:
I want to remove all the data from the rows and just want to keep the headers i.e. Person Name, Number of Photos Enrolled and Gallery. How can I do this in pyqt5 python. Below is the code I tried but seems not to working:
for item in self.home_ui.show_person_gallery_table.selectedItems():
new_item = self.home_ui.show_person_gallery_table.item()
self.home_ui.show_person_gallery_table.setItem(item.row(), item.column(), new_item)