1 | bool writeTextFile(QString path, const QString& text, QTextCodec *codec) |
API说明:
void QTextStream::setGenerateByteOrderMark(bool generate)
If generate is true and a UTF codec is used, QTextStream will insert the BOM (Byte Order Mark) before any data has been written to the device. If generate is false, no BOM will be inserted. This function must be called before any data is written. Otherwise, it does nothing.