16,233
社区成员
发帖
与我相关
我的任务
分享
int main() { QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); ...... }
[quote=引用 11 楼 jxbinwd 的回复:] 不用设置什么编码,直接用QStringLiteral宏,比如:QStringLiteral("提示") 只要中文都加上QStringLiteral,显示正常。