Results 1 to 3 of 3

Thread: adding special symbol unicode to qstring

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default adding special symbol unicode to qstring

    hi freinds/Experts,

    I am adding special symbols to QString using

    Qt Code:
    1. uint32_t val = 0x221A; //Roots
    2. QString symbolText = QChar(val);
    3. widget->setText(symbolText);
    To copy to clipboard, switch view to plain text mode 

    but for some range i not able to add those special characters

    ex: 0x22F6 to 0x22FB , 0x2A0B to 0x2A1C.
    these special mathematical symbols i have to add into my widget text.
    for these ranges the output is always a empty box.

    is it a problem with 32 bit char
    QString is not supporting it
    the way i implemented is wrong.

    please help me.
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: adding special symbol unicode to qstring

    If you mean you see a character in the widget but it looks like a box instead of "SQUARE ROOT" (http://www.fileformat.info/info/unic...221a/index.htm) then it is likely that the font you are using does not contain a glyph for that Unicode code point. This replacment symbol is often, but not always, the "WHITE SQUARE" glyph (http://www.fileformat.info/info/unic...25a1/index.htm)

  3. The following user says thank you to ChrisW67 for this useful post:

    wagmare (1st June 2016)

  4. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: adding special symbol unicode to qstring

    thanks chris . your answer is right. i have to give options to select font also.
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. XKeySymToKeyCode returns 0 for unicode and special characters
    By Deepika in forum General Programming
    Replies: 0
    Last Post: 16th July 2015, 13:21
  2. XSendEvent failed for unicode/special characters in Linux
    By Deepika in forum General Programming
    Replies: 0
    Last Post: 16th July 2015, 06:05
  3. Replies: 0
    Last Post: 16th July 2015, 06:05
  4. QString Special Character Problem
    By hakiim35 in forum Qt Programming
    Replies: 1
    Last Post: 3rd October 2011, 14:38
  5. special meaning of & symbol inside string
    By babu198649 in forum Newbie
    Replies: 1
    Last Post: 2nd February 2009, 07:19

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.