PDA

View Full Version : avaiability of data from QDataStream



quickNitin
19th June 2006, 08:36
Is data wittten to QDataStream is single time readable only?
I am writing data to a socket where it is reflecting correctly but when i read it in next instuction sth else id read.
Any guidance is always welcome?

e8johan
19th June 2006, 13:32
The stream in the name indicates that that is the case, you pick a part of the stream each time. I'd recommend that you build a class around a stream that holds the last character. Through that class you can has a pop() (streaming) and a top() (leaves the stream alone) method.