SkripT
23rd March 2006, 01:21
Hi all, in my application I use a QListWidget of icons, an I've got 2 questions about it:
1) In some moments I need to do a processation of all the selected items in the list. What do you think that's the best way to do it: calling QListWidget::selectedItems and then process all the returned items or directly search for all the items in the list which is selected and process it. I have read the source code to see if "selectedItems" method saves internally a list with the current selected items (as I think) or simply it makes a search for all the items of the list to see which are selected. But I haven't found it. Anyone knows it?
2) This question is related with previous. Do you think that QListWidget::findItems uses an eficient way to make the search (i.e a kind of dictionary or hash with the items of the list) or simply it searches for all the items in the list testing which of they matches with the text and the flags of the search?
Thanks.
1) In some moments I need to do a processation of all the selected items in the list. What do you think that's the best way to do it: calling QListWidget::selectedItems and then process all the returned items or directly search for all the items in the list which is selected and process it. I have read the source code to see if "selectedItems" method saves internally a list with the current selected items (as I think) or simply it makes a search for all the items of the list to see which are selected. But I haven't found it. Anyone knows it?
2) This question is related with previous. Do you think that QListWidget::findItems uses an eficient way to make the search (i.e a kind of dictionary or hash with the items of the list) or simply it searches for all the items in the list testing which of they matches with the text and the flags of the search?
Thanks.