PyQt: QListView how to retrieve selected items?
Diez B. Roggisch
deets at nospam.web.de
Thu Feb 2 17:02:35 EST 2006
Flavio schrieb:
> Iterating over the items and checking if it is selected, sounds like a
> good idea, but there no obvious way to get a hold of the list of
> items!! The only way you can get an item is if you are in single
> selection mode and you call selectedItem(). But I have to use multiple
> selection mode, for which this method does not work (it says so in the
> docs)
Who has created these items? Obviously you, so you _can_ store the list
of selected items.
Or you use the equally well documented QListViewItemIterator to traverse
the list of items.
regards,
Diez
More information about the Python-list
mailing list