windows - QTextEdit unicode QString not working -
i'm trying write method prints messages in qtextedit
, using custom font (veteran typewriter). font use supports unicode when use in application, characters 'ą', 'ę', 'ż' , other polish characters not shows correctly (all replaced �). have idea why? how force use unicode? (i'm using visual studio 2013 community + qt5 add-on, on windows 10 x64 , project defined x64 too).
my code:
void qtcubic::qtcstartscreen::sendmessage(qstring message) { if (log.toplaintext().length() != 0) { log.insertplaintext("\n"); } log.insertplaintext(message); }
and how send example meassage:
splashscreen.sendmessage("zażółć gęślą jaźń");
if you're going use unicode string literals in qt, should using qstringliteral macro.
in other words, code this:
splashscreen.sendmessage(qstringliteral("zażółć gęślą jaźń"));
Comments
Post a Comment