[PyQt] Show selected rows

Scott Frankel frankel at circlesfx.com
Wed Mar 17 03:42:17 GMT 2010


Hi Mads,

You might take a look at QTableView.setRowHidden().

I'm testing something along similar lines.  (See my displayTableRows()  
method in the attached file.)  While my working code gets its  
displayable rows from a second SQL query, in your case, it wouldn't  
take much to glean the info from a selectionModel.

Though if anyone has a better suggestion, I'm all ears.

Scott


-------------- next part --------------
A non-text attachment was scrubbed...
Name: modelViewTest.py
Type: text/x-python-script
Size: 5811 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100316/0dc742d5/attachment.bin>
-------------- next part --------------







On Mar 16, 2010, at 1:23 PM, Mads Ipsen wrote:

> Dear Gurus,
>
> Suppose I have a table model that I view in a QTableView (A). In  
> another QTableView (B) I want to display the rows that are selected  
> in the first QTableView (A).
>
> How do I achieve this? Ie, each selected row in view (A) should be  
> displayed in view (B).
>
> Best regards,
>
> Mads
>
> -- 
> +-------------------------------------------------------------+
> | Mads Ipsen, Scientific developer                            |
> +-------------------------------+-----------------------------+
> | QuantumWise A/S               | phone:         +45-29716388 |
> | N?rre S?gade 27A              | www:    www.quantumwise.com |
> | DK-1370 Copenhagen K, Denmark | email:  mpi at quantumwise.com |
> +-------------------------------+-----------------------------+
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

Scott Frankel
President
Circle-S Studios

510-339-7477 (o)
510-332-2990 (c)

www.circlesfx.com
www.sequoyaworkflow.com












More information about the PyQt mailing list