[PyQt] How to get a list of all items in QListWidget?

Karlo Lozovina karlo.lozovina at gmail.com
Wed Apr 23 13:10:52 BST 2008

On 4/23/08, Dirk Reisnauer <dirk.reisnauer at desys.de> wrote:

>  try this...
>  items = []
>  for index in xrange(self.listWidget.count()):
>     items.append(self.listWidget.item(index))

That did cross my mind, but it seems somehow inefficient. For now I'm
just storing all QListWidgetItems I create in a list, and use that.


More information about the PyQt mailing list