After processing XML files with QDomDocument and saving them like this:
if(fileName!=""){
QMessageBox::critical(this,tr
("Error"),tr
("Could not open file"));
}else{
QString fdt
=FDTemplate
->toString
();
fdt.toStdString();
stream<<fdt;
stream.flush();
file.close();
}
if(fileName!=""){
QFile file(fileName);
if(!file.open(QIODevice::WriteOnly)){
QMessageBox::critical(this,tr("Error"),tr("Could not open file"));
}else{
QTextStream stream(&file);
QString fdt=FDTemplate->toString();
fdt.toStdString();
stream<<fdt;
stream.flush();
file.close();
}
To copy to clipboard, switch view to plain text mode
the files cannot be opened using Word or FrameMaker. Frame maker error is "Invalid byte"(funky signs)" of a -byte sequence". Does anyone know
what is going on? The files look fine when i open them with NotePad and NotePad++...
I read somewhere that this might be casued by QString and I've tried to convert it to std::string using .toStdString() before sending to QTextStream, but that did no help.
Bookmarks