get ascii value of qchar 1

get ascii value of qchar

QString test("test");
QChar c = test.at(0);
int v_latin = c.toLatin1(); // for QT > 5
int v_ascii = c.toAscii(); // for QT <= 5 [DEPRECATED]

Here is what the above code is Doing:
1. Create a QString object with the value "test"
2. Get the first character of the string
3. Convert the character to a Latin-1 character
4. Convert the character to an ASCII character

The result is that v_latin and v_ascii will both be 116.

The reason for this is that the QString class is a Unicode string. The QChar class is a Unicode character. The QChar class has a toLatin1() method that converts the Unicode character to a Latin-1 character. The QChar class also has a toAscii() method that converts the Unicode character to an ASCII character.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The ASCII character set is a 7-bit character set. The Latin-1 character set is an 8-bit character set.

The ASCII character set is a subset of the Latin-1 character set. The

Similar Posts