[solved] QTextStream \n does not function
-
@
QFile file_datiGenerali("C:/TemperamentvolleSMS/datiGenerali.txt");
if(file_datiGenerali.open(QIODevice::Append | QIODevice::ReadWrite))
{
QTextStream stream_fileDatiGenerali(&file_datiGenerali);
qDebug() << "i am in importasms";
stream_fileDatiGenerali.setCodec("UTF-8");
stream_fileDatiGenerali << "USATO GIA<br>";
stream_fileDatiGenerali << "ciao";
this->visualizzaSchermataBase();
}
@
does not start.
i tried too:
@
stream_fileDatiGenerali << "USATO GIA\n";
stream_fileDatiGenerali << "ciao";stream_fileDatiGenerali << "USATO GIA" << endl; stream_fileDatiGenerali << "ciao"; stream_fileDatiGenerali << "USATO GIA" << '\n'; stream_fileDatiGenerali << "ciao";
@
nothing...Edit: fixed spelling mistake in title; Andre
-
[quote author="Rahul Das" date="1314188375"]bq. QFile file_datiGenerali("C:/TemperamentvolleSMS/datiGenerali.txt");
Are you sure with the slashes ;) ??[/quote]
Yes. That is correct, and the recommended way of dealing with file paths. Internally, use forward slashes, only convert to the native format when presenting to the user. Qt will handle the slashes just fine. -