PyQt: QListView how to retrieve selected items?

Flavio fccoelho at gmail.com
Thu Feb 2 17:41:01 EST 2006


> Who has created these items? Obviously you, so you _can_ store the list
> of selected items.

well yeah, but the Idea was to let the user select(through the widget)
a subset of the original list and then access that subset...

> Or you use the equally well documented QListViewItemIterator to traverse
> the list of items.

Alright! Now you've hit the jackpot! I didn't know that class! There is
no  reference to it in the QListView docs! This can solve my problem
(combined with isSelected()), though not as elegantly or efficiently as
having direct access to the set of selected items which already exists
but is not accessible...

Thanks Diez!




More information about the Python-list mailing list