[Qt-interest] programmatically select multiple items in a listwidget

Andreas Pakulat apaku at gmx.de
Wed Jul 15 18:35:11 CEST 2009


On 15.07.09 09:18:28, Christopher Evans wrote:
> I am 'repainting' or 'refilling' a multi-select list widget, however, I 
> would like the same items selected.
> 
> I have a single updateList() fn, and I am just updating the text, should 
> I just make an updateListText() fn and call it a day?
> 
> I see setCurrentItem, and selectedItems.  I do not see anything like 
> setCurrentItems.

Look at the QItemSelectionModel, specifically the select() method.

Andreas

-- 
A gift of a flower will soon be made to you.



More information about the Qt-interest-old mailing list