I have a QString which contains a japanese string. But while debugging its just showing "???" in place of string. I need it to display it in qml. I have used QtextCodec but didnt work for me. Please give any solution or suggestion to fix the issue.
Asked
Active
Viewed 1,278 times
2 Answers
0
Save source file in UTF-8 (or other which can encode your characters) encoding
Set default codec with
QtextCodec
(I've tried, and it is working without this setting, too).Use
label->setText(QString::fromWCharArray(L"日本語"));

Nemanja Boric
- 21,627
- 6
- 67
- 91