1编码 编辑->SelectEncoding->选中GBK编码->按编码保存,然后在中文字符前面加上"u8"即可 2 .QStrungLiteral(str) QStingLiteral("字符串"); PS:不要在高频率下使用,因为此函数调用会损耗进程资源