Could any one help me in modifying this snippet of code or rewriting from scratch, to append a text to the end of the file and then read that text from the end of the same file. The text has a length of 1024 unicode characters exactly.
// append 1024 letters
QFile myFile(”/Users/dulajun/Documents/pages.indd”);
myFile.open(QIODevice::Append);
QDataStream out(&myFile);
//Here the code
…
//read from the end 1024 letters
myFile.open(QIODevice::ReadOnly);
QDataStream in(&myFile);
QString text; //to receive the text.
//Here the code
↧