PDA

View Full Version : qlistwidget count of selected items



tpf80
23rd May 2007, 00:45
I know you can use count() on a QListWidget to get the count of the items in the widget.

Is there a better way to get the count of only the selected items in the widget, rather than using QListWidget::selectedItems () and then getting the count of that list?

wysota
23rd May 2007, 09:02
What's wrong with using selectedItems() and count()?

tpf80
23rd May 2007, 19:47
From what I gathered, selectedItems() makes a copy of the selected items does it not? and then you get a count of that. I was just seeing if there was a more efficient way to do it, that wouldn't need to make a copy.

wysota
23rd May 2007, 20:05
No, it creates a list of pointers. It doesn't copy any objects.

rajesh
10th December 2009, 13:31
How to Copy all selected item in clipboard ?