Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PyQt - Question on QListWidget's selectedItems Method

24 views
Skip to first unread message

Kelie

unread,
Apr 1, 2008, 3:16:08 PM4/1/08
to
Hello,

This method returns selected items by the order of user's picking,
instead of the original order of these items. For example, if a
ListWidget stores a list of ['A', 'B', 'C', 'D'] and when user is
prompted to make a selection, if he picks 'D' first, then 'B', the
returned ListWidget items would be 'D' first, then 'B', instead of 'B'
first, then 'D'. This seems unusual to me. Would users normally care
about the order of these items being picked? This selectedItems method
does not seem to have an optional argument that allows returned items
to be in their original order when added to the ListWidget. What did I
miss?

Thank you!

Kelie

unread,
Apr 1, 2008, 5:20:27 PM4/1/08
to
Another question I have about QListWidget is when user manually
selects and deselects a QListWidgetItem, the background color switches
between blue and white. But when an item is programmingly selected
with setItemSelected method, the background color is some kind of
light gray instead of blue. Why is there such a difference and how do
I programmingly set the QListWidgetItem background color to blue?

Thank you!

0 new messages