Qt Code:
  1. text ="left\n";
  2. text =text +"right\n";
  3. QFile f(file);
  4. f.open(IO_WriteOnly);
  5. QTextStream xstrm(&f);
  6. xstrm << text;
  7. f.close();
To copy to clipboard, switch view to plain text mode 
I thought that this code produce a file so:
Qt Code:
  1. left
  2. right
To copy to clipboard, switch view to plain text mode 
Instead:
Qt Code:
  1. leftright
To copy to clipboard, switch view to plain text mode 
how can I do? thanks.