Results 1 to 2 of 2

Thread: Translate one QString to unicode

  1. #1
    Join Date
    Oct 2016
    Posts
    61
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Translate one QString to unicode

    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 ¿?

  2. #2
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    254
    Thanks
    92
    Thanked 16 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: Translate one QString to unicode

    You could have done this first.
    http://lmgtfy.com/?q=print+QString+as+unicode

    Anyway, the answer is
    Qt Code:
    1. qDebug() << QString::fromUtf8("\u0024"); // gives output as $
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QString unicode
    By ramin.lich in forum Newbie
    Replies: 1
    Last Post: 24th April 2015, 23:01
  2. Qt5.3 tr() needs to translate QString
    By ad5xj in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2014, 00:48
  3. QString unicode replace
    By trallallero in forum Qt Programming
    Replies: 0
    Last Post: 26th June 2012, 14:57
  4. QString and Unicode
    By juanjo_de_la_pradera in forum Qt Programming
    Replies: 0
    Last Post: 23rd September 2010, 13:38
  5. QString unicode problem
    By kemp in forum Qt Programming
    Replies: 6
    Last Post: 21st September 2010, 15:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.