[PyQt] Fast way to display an array in a table?
David Douard
david.douard at logilab.fr
Thu May 28 21:08:27 BST 2009
Le jeudi 28 mai 2009 20:57:50 Vicente Sole, vous avez écrit :
> Hello,
>
> I am writing a generic data handling application in which I need to be
> able to show the contents of a numpy array in a sort of
> table/spreadsheet. The array can be big (1024 x 1024 floats or may be
> even more).
>
> Is there a faster way of filling a table than looping through all the
> array elements and introducing them in the table cells one by one?
>
You should use a QTableView with a model you write (which should derivate from
QAbstractTableModel) like the file attached.
--
David Douard LOGILAB, Paris (France), +33 1 45 32 03 12
Formations Python, Numpy, Debian : http://www.logilab.fr/formations
Développement logiciel sur mesure : http://www.logilab.fr/services
Informatique scientifique : http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demo_view.py
Type: text/x-python
Size: 889 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090528/8ecfadc3/demo_view.py
More information about the PyQt
mailing list