This does it.
Qt Code:
  1. QTextStream out(&file);
  2. //here
  3. x << "item1" << "item2" << "item3";
  4. for ( QStringList::Iterator it = x.begin(); it != x.end(); ++it )
  5. out << *it << "\n";
To copy to clipboard, switch view to plain text mode 

Now i guess i must do some reading about QVariant