why chinese character is messy at VS2012 using qt5?

i have tried so many ways at webiste to solve this fucky problem,

but no ways keep going,why?

we have ignore that, although we have change the coding-ways in VS2012 as follows:

but it remains messy,why?

we should konwn although we changed the coding sytle ,but the string in our C++ remains unchanged ,so you need to re-input them!!!!

that's the point.

now i give you a sure-to-make-effective ways :

1.change you code-sytle in File->advanced save setting, select Unicode (UTF-8 with signature).

2.re-input your chinese.!!!

3.use setWindowTitle(QStringLiteral("湖南")); 

make sure you have done 3 steps.it works now!

原文地址:https://www.cnblogs.com/dragen/p/3581223.html