I am really confused about displaying Chinese!
First,my windows' language is Chinese.To display Chinese in my app,I searched the Internet and found that I could add the following code to my app and used tr() where I wanted to display Chinese.
QTextCodec::setCodecForTr(QTextCodec::codecForName("GBK"));
To copy to clipboard, switch view to plain text mode
To my release,it really worked very well.However,when I opened my app in my friend's computer,it did't work correctly.My friend's os is also win xp in Chinese!
Then I added the following codes to my app rather than the former one.
QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale());
QTextCodec::setCodecForTr(QTextCodec::codecForLocale());
To copy to clipboard, switch view to plain text mode
It works perfectly whether on my computer or my friend's.
What happens?
And if I run this app on an English os,can it work correctly?If not,what should I do?Thanks!
Bookmarks