×

Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    87

    How to display surrogate pair character with QPainter::DrawText()

    In the following way, an UCS2 character can be displayed correctly. But when it comes surrogate pair, nothing displayed. I know that two QChar inside a QString will be used for a surrogate pair. The question is how to let the system know it's a surrogate pair not two QChars and display it correctly?

    Code:
    uint a = 0x20000 //surrogate pair character 
    QString str;
    str.append(a);
    painter.Drawtext(str);

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How to display surrogate pair character with QPainter::DrawText()

    Well, not with String::append(uint) -- that will most likely translate to String::append(QChar(uint)), which will truncate away the high-order part of your literal.

Similar Threads

  1. RSS file problem or...?
    By Sambon5 in forum Symbian
    Replies: 6
    Last Post: 2008-08-05, 13:42
  2. Display Chinese Character in MMS-capable phone
    By ludylu in forum General Messaging
    Replies: 1
    Last Post: 2002-11-01, 07:11
  3. Display question ...
    By kapot in forum Mobile Java General
    Replies: 0
    Last Post: 2002-10-14, 22:09
  4. Display Chinese Character in a wap phone
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-17, 14:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •