hey,
I was wondering how I could serialize a c++ string into a QDatastream

something like this:
Qt Code:
  1. string myString = "hello";
  2. someStruct.myString = myString;
To copy to clipboard, switch view to plain text mode 

serialize via operator:
Qt Code:
  1. QDataStream& operator<< (QDataStream& out, const someStruct)
  2. {
  3. out << someStruct.myString;
To copy to clipboard, switch view to plain text mode 

How do I serialize the string in the QDataStream.
Obviously the above doesn't work.
I need this for something but the Qt reference isn't helping me.

Does anyone know how to do this?