Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. PySide - Delete selected items
Forum Updated to NodeBB v4.3 + New Features

PySide - Delete selected items

Scheduled Pinned Locked Moved General and Desktop
pyside
1 Posts 1 Posters 936 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JoNo_21
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved