If you want to combine into a local string, one method is to combine the QStringList into a QString first, and then call the methods of toAscii (), toLocal8Bit (), toLatin 1 () and toUtf8 () of QString according to the actual encoding format, or use QTextCodec to convert it into the corresponding encoded QByteArray.