The QDataStream allows you to serialize some of the Qt data types. For QString, char pointer is right. These are my example:
First is used to write a QString into a file:
Qt Code:
  1. QFile file("file.dat");
  2. file.open(QIODevice::WriteOnly);
  3. QDataStream out(&file);
  4. out << "Hello World!";
To copy to clipboard, switch view to plain text mode 
Second is used to read content from a file:
Qt Code:
  1. char *ch;
  2. QFile file("file.dat");
  3. file.open(QIODevice::ReadOnly);
  4. QDataStream in(&file);
  5. in >> ch;
  6. QString str(ch);
To copy to clipboard, switch view to plain text mode 
The "str" is your result!