一行代码搞定:#pragma execution_character_set("utf-8") 或字符串格式转换:QString::fromLocal8Bit("中文"); QStringLiteral("中文");