PDA

View Full Version : Translate one QString to unicode



SirJonas
17th November 2016, 16:36
Hi i am trying to get translation of my text to Unicode but anyways not works. I am trying to get with this format like "/u0024" --> $, for example, and why? because i want to show some symbol's with my keyboard. Anyways couldn't some one know some way to solve this ¿?

rawfool
18th November 2016, 05:37
You could have done this first.
http://lmgtfy.com/?q=print+QString+as+unicode

Anyway, the answer is

qDebug() << QString::fromUtf8("\u0024"); // gives output as $