How to display characters with ASCII codes greater than 127 in QT

Source: Internet
Author: User

The previous time to show "≤" symbol looked for a long time did not find the method, found in the following methods can be resolved;

UShort gd[]={8805,0};
QString Gteq=qstring::fromutf16 (GD);

The Gteq obtained is "≤";

Function: qstring::fromutf16 (const ushort* unicode,int size=-1):

Parameter Unicode: is the array of Unicode code corresponding to the string we want;

Parameter size: Is the length of the array and ends with 0 if no length is specified;

How do you know that the "≤" Unicode code is 8805?

Well, with Microsoft Word, you can see its Unicode code by opening Word to "≤" in the insert-and-sign dialog box:

Note: Here is the hex!

http://blog.csdn.net/hjh2005/article/details/6978804

How to display characters with ASCII codes greater than 127 in QT

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.