[PyQt] Re: Question on QListWidget's selectedItems Method
kf9150 at gmail.com
Fri Apr 4 20:57:55 BST 2008
Anyway, these are the questions I asked.
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'. Is this the expected behavior? 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. Is there another method
I should use? What did I miss?
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?
(Btw, Am I not supposed to direct users to another mailing list?)
More information about the PyQt