[Qt-interest] how to output a user defined struct data to datastream?

Andre Haupt andre at bitwigglers.org
Fri Oct 14 12:58:50 CEST 2011


On Fri, Oct 14, 2011 at 04:57:59AM -0400, Vincent Cai wrote:
> Hi,
> 
>         So in the way, if I want to output an big array: quint16 dataArray[1000][1000] to datastream,
>         I have to output the dataArray items one by one with a for loop?
>         If yes, then the efficiency will be very poor, right?

writing 1 million quint16 to a QDataStream attached to a QFile takes
approx. 27 ms on my machine. I wouldnt call that poor efficiency ;-)

cheers,

Andre



More information about the Qt-interest-old mailing list