@riverbankcomputing.com
Betreff: Re: [PyQt] get list of selected items in a listWidget
well, I found my self another way, similar but shorter.
only the printItem() function have been changed from the previous code.
def printItemText(self):
items = self.listWidget.selectedItems
*well, I found my self another way, similar but shorter.*
*only the printItem() function have been changed from the previous code.*
*
*
> def printItemText(self):
> items = self.listWidget.selectedItems()
> x=[]
> for i in list(items):
> x.append(str(i.text()))
> print x
On Mon, Mar 26, 2012 at