Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

PySide - Delete selected items



  • I'm currently deleting the selected items in a QLIstWidget like so:

    for item in self.selectedItems():
        self.takeItem(self.row(item))
    

    My list consists of 20,000 entries and this is proving to be way too slow. Is there a faster way? In C++ land I saw an example online where qDeleteAll(selectedItems()) was used. Is there an equivalent in PySide, or some other faster approach?

    Thanks.


Log in to reply