thanks for the reply

the mistake was actually somewhere else

if u see the code deeply, then i have closed the file and then for writing the data i was not opening it.

now the file is being written correctly
i just want to ask one thing now
and that is i m currently transferring text files and writing the same to another text file. is it possible to transfer any kind of binary files like pdf, zip, jpg etc. and recieve it in the same format using the same code listed above? may be the slightest modification i guess would be to use QDataStream rather than QTextStream

wat Say??