Hi, without repeat all code before with your solution I've got the prevoius problem inside the file:
Qt Code:
  1. <Light0 pos="4 1 4 1" //wrong
To copy to clipboard, switch view to plain text mode 
But if I use my prevoius code works (but i can put what Write() do only before tag PLAIN and not inside it....
Qt Code:
  1. ..............................
  2. Write(QTextStream(&f));
  3. QDomText t1 = doc.createTextNode("hello");
  4. .............
To copy to clipboard, switch view to plain text mode