PDA

View Full Version : QTextStream & QByteArray



ixSci
9th June 2010, 11:03
Hello folks,

I've a very simple scratch of a code:



QByteArray Data;
QTextStream Stream(&Data);
Stream << "string";
After execution of the code Data is absolutely empty. Is it a bag or I misunderstood something?
P.S. I debugged QTextStream::operator<< and it seems that QTextStream sees no problem.

Thank you!

numbat
9th June 2010, 11:52
Call Stream.flush();

ixSci
9th June 2010, 12:26
numbat, thank you.