yes it was the error; but if I use .read() my app doesn't respond....
I coded this also:
f.open(IO_ReadOnly | IO_WriteOnly);
QString plainText
= xstrm.
readLine();
// or .read() QDomText t1
= doc.
createTextNode(plainText
);
//QDomText t1 = doc.createTextNode("hello"); //with this ok
tag1.appendChild(t1);
QFile f(file);
f.open(IO_ReadOnly | IO_WriteOnly);
QTextStream xstrm(&f);
Class.Write(QTextStream(&f));
QString plainText = xstrm.readLine(); // or .read()
QDomText t1 = doc.createTextNode(plainText);
//QDomText t1 = doc.createTextNode("hello"); //with this ok
tag1.appendChild(t1);
To copy to clipboard, switch view to plain text mode
xstrm << "hello\n";
}
void Class::Write(QTextStream &xstrm) {
xstrm << "hello\n";
}
To copy to clipboard, switch view to plain text mode
after this in my file I found:
hello
a line of ascii code
hello
a line of ascii code
To copy to clipboard, switch view to plain text mode
why? "hello" is right...with "QDomText t1 = doc.createTextNode(plainText)" I'm trying to insert again "hello" in the file.....thanks
Bookmarks