[PyQt] Get a list of selected rows in a QTableWidget

Russell Valentine russ at coldstonelabs.org
Thu Mar 4 23:52:01 GMT 2010


rows=[]
for idx in self.table.selectedIndexes()
	rows.append(idx.row())

starglider develop wrote:
> Hi,
> how can I get a list of all selected rows in a QTableWidget.
> I try to play with selectedIndexes() but don't know how to convert in rows
> index.
> 
> Thank you in advance for your help.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list