Qt-interest Archive, April 2008
QTable updates are too slow
Message 1 in thread
Hello,
Currently I am using QT 3.3.7 (dated, I know, but its what I have to work
with for now).
I have a 2D array of complex floating point numbers (400 rows by 300
columns), which I need to display on the screen in some kind of table.
I've tried using QTable to display this data, but the update (using
setText) is just too slow. I've tried using setUpdatesEnabled() before and
after the update, but it seems to have no effect.
Anyhow, I wanted to know if there was a better method for doing this -- or
if later versions of QT have a speedier update method for QTable.
Thanks,
Thomas Wharton
--
[ signature omitted ]
Message 2 in thread
Indeed, Qt4 introduced the model/view architecture:
http://doc.trolltech.com/4.3/model-view-programming.html
Using this, only the data that are currently visible have to be updated (if done right, you can write a model class that directly accesses your current data - the 2d array of numbers - without it having to be copied somewhere).
Cheers,
Peter
> -----Ursprüngliche Nachricht-----
> Von: Thomas Wharton [mailto:Thomas_Wharton@xxxxxxxxxxxx]
> Gesendet: Mittwoch, 30. April 2008 15:00
> An: qt-interest@xxxxxxxxxxxxx
> Betreff: QTable updates are too slow
>
>
> Hello,
>
> Currently I am using QT 3.3.7 (dated, I know, but its what I
> have to work
> with for now).
>
> I have a 2D array of complex floating point numbers (400 rows by 300
> columns), which I need to display on the screen in some kind of table.
> I've tried using QTable to display this data, but the update (using
> setText) is just too slow. I've tried using
> setUpdatesEnabled() before and
> after the update, but it seems to have no effect.
>
> Anyhow, I wanted to know if there was a better method for
> doing this -- or
> if later versions of QT have a speedier update method for QTable.
>
> Thanks,
> Thomas Wharton
--
[ signature omitted ]