qt中经常遇到显示中文乱码问题。

有两种好的解决办法:

1.中英文翻译器(推荐)

2.在汉字前面加上u8

如下:

QString str = u8"测试";
    QAction *action1 = new QAction(str);

 

相关文章: