I thought that this code produce a file so:Qt Code:
text ="left\n"; text =text +"right\n"; f.open(IO_WriteOnly); xstrm << text; f.close();To copy to clipboard, switch view to plain text mode
Instead:
how can I do? thanks.
I thought that this code produce a file so:Qt Code:
text ="left\n"; text =text +"right\n"; f.open(IO_WriteOnly); xstrm << text; f.close();To copy to clipboard, switch view to plain text mode
Instead:
how can I do? thanks.
Regards
it seems you forget a flag in the open method of your file.
in Qt4 the flag is QIODevice::Text, so in Qt3 it should be something like IO_Text
on Windows, line breaks aren't only "\n" but actually "\r\n"
Current Qt projects : QCodeEdit, RotiDeCode
mickey (24th February 2006)
One should use endl() to write a newline to the stream instead of using \n.
Because windows consider a new line to be "\n\r" , they just can't figure out that computers are not typewriters anymoreOriginally Posted by wysota
![]()
Bookmarks