QChar 類

QChar 類提供 16 位 Unicode 字符。 更多...

頭: #include <QChar>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core

此類 強烈可比較 .

此類 強烈可比較 采用 char16_t, QString , QStringView , QLatin1StringView ,和 QUtf8StringView .

此類 強烈可比較 with const char *, QByteArray ,和 QByteArrayView .

The contents of the byte array is interpreted as UTF-8.

注意: 此類的所有函數 可重入 .

公共類型

enum 類彆 { Mark_NonSpacing, Mark_SpacingCombining, Mark_Enclosing, Number_DecimalDigit, Number_Letter, …, Symbol_Other }
enum Decomposition { NoDecomposition, Canonical, Circle, Compat, Final, …, Wide }
enum Direction { DirAL, DirAN, DirB, DirBN, DirCS, …, DirWS }
enum JoiningType { Joining_None, Joining_Causing, Joining_Dual, Joining_Right, Joining_Left, Joining_Transparent }
enum Script { Script_Unknown, Script_Inherited, Script_Common, Script_Adlam, Script_Ahom, …, Script_ZanabazarSquare }
enum SpecialCharacter { Null, Tabulation, LineFeed, FormFeed, CarriageReturn, …, LastValidCodePoint }
enum UnicodeVersion { Unicode_1_1, Unicode_2_0, Unicode_2_1_2, Unicode_3_0, Unicode_3_1, …, Unicode_Unassigned }

公共函數

QChar ()
QChar (QChar::SpecialCharacter ch )
QChar (QLatin1Char ch )
QChar (char ch )
QChar (char16_t ch )
QChar (char32_t code )
QChar (int code )
QChar (short code )
QChar (uchar ch )
QChar (uint code )
QChar (ushort code )
QChar (wchar_t ch )
QChar (uchar cell , uchar row )
QChar::Category category () const
uchar cell () const
unsigned char combiningClass () const
QString decomposition () const
QChar::Decomposition decompositionTag () const
int digitValue () const
QChar::Direction direction () const
bool hasMirrored () const
bool isDigit () const
bool isHighSurrogate () const
bool isLetter () const
bool isLetterOrNumber () const
bool isLowSurrogate () const
bool isLower () const
bool isMark () const
bool isNonCharacter () const
bool isNull () const
bool isNumber () const
bool isPrint () const
bool isPunct () const
bool isSpace () const
bool isSurrogate () const
bool isSymbol () const
bool isTitleCase () const
bool isUpper () const
QChar::JoiningType joiningType () const
QChar mirroredChar () const
uchar row () const
QChar::Script script () const
QChar toCaseFolded () const
char toLatin1 () const
QChar toLower () const
QChar toTitleCase () const
QChar toUpper () const
char16_t & unicode ()
char16_t unicode () const
QChar::UnicodeVersion unicodeVersion () const

靜態公共成員

QChar::Category category (char32_t ucs4 )
unsigned char combiningClass (char32_t ucs4 )
QChar::UnicodeVersion currentUnicodeVersion ()
QString decomposition (char32_t ucs4 )
QChar::Decomposition decompositionTag (char32_t ucs4 )
int digitValue (char32_t ucs4 )
QChar::Direction direction (char32_t ucs4 )
QChar fromLatin1 (char c )
(從 6.0 起) QChar fromUcs2 (char16_t c )
(從 6.0 起) auto fromUcs4 (char32_t c )
bool hasMirrored (char32_t ucs4 )
char16_t highSurrogate (char32_t ucs4 )
bool isDigit (char32_t ucs4 )
bool isHighSurrogate (char32_t ucs4 )
bool isLetter (char32_t ucs4 )
bool isLetterOrNumber (char32_t ucs4 )
bool isLowSurrogate (char32_t ucs4 )
bool isLower (char32_t ucs4 )
bool isMark (char32_t ucs4 )
bool isNonCharacter (char32_t ucs4 )
bool isNumber (char32_t ucs4 )
bool isPrint (char32_t ucs4 )
bool isPunct (char32_t ucs4 )
bool isSpace (char32_t ucs4 )
bool isSurrogate (char32_t ucs4 )
bool isSymbol (char32_t ucs4 )
bool isTitleCase (char32_t ucs4 )
bool isUpper (char32_t ucs4 )
QChar::JoiningType joiningType (char32_t ucs4 )
char16_t lowSurrogate (char32_t ucs4 )
char32_t mirroredChar (char32_t ucs4 )
bool requiresSurrogates (char32_t ucs4 )
QChar::Script script (char32_t ucs4 )
char32_t surrogateToUcs4 (char16_t high , char16_t low )
char32_t surrogateToUcs4 (QChar high , QChar low )
char32_t toCaseFolded (char32_t ucs4 )
char32_t toLower (char32_t ucs4 )
char32_t toTitleCase (char32_t ucs4 )
char32_t toUpper (char32_t ucs4 )
QChar::UnicodeVersion unicodeVersion (char32_t ucs4 )
bool operator!= (const QChar & c1 , const QChar & c2 )
bool operator< (const QChar & c1 , const QChar & c2 )
QDataStream & operator<< (QDataStream & out , QChar chr )
bool operator<= (const QChar & c1 , const QChar & c2 )
bool operator== (const QChar & c1 , const QChar & c2 )
bool operator> (const QChar & c1 , const QChar & c2 )
bool operator>= (const QChar & c1 , const QChar & c2 )
QDataStream & operator>> (QDataStream & in , QChar & chr )

詳細描述

在 Qt 中,Unicode 字符是沒有任何標記 (或結構) 的 16 位實體。此類錶示這種實體。它很輕量,所以可以在任何地方使用。大多數編譯器視它像 unsigned short .

QChar 提供完全互補的測試/分類函數、轉換到/來自其它格式、從將閤成 Unicode 轉換為分解 Unicode、及試著比較和大小寫轉換,若要求的話。

The classification functions include functions like those in the standard C++ header <cctype> (formerly <ctype.h>), but operating on the full range of Unicode characters, not just for the ASCII range. They all return true if the character is a certain type of character; otherwise they return false. These classification functions are isNull () (返迴 true 若字符為 \0), isPrint () (true if the character is any sort of printable character, including whitespace), isPunct () (any sort of punctation), isMark () (Unicode 標記), isLetter () (字母), isNumber () (任意排序的數字字符,不僅僅 0-9), isLetterOrNumber (),和 isDigit () (decimal digits). All of these are wrappers around category () which return the Unicode-defined category of each character. Some of these also calculate the derived properties (for example isSpace () 返迴 true if the character is of category Separator_* or an exceptional code point from Other_Control 類彆)。

QChar 還提供 direction (), which indicates the "natural" writing direction of this character. The joiningType () function indicates how the character joins with it's neighbors (needed mostly for Arabic or Syriac) and finally hasMirrored (), which indicates whether the character needs to be mirrored when it is printed in it's "unnatural" writing direction.

閤成的 Unicode 字符 (像 ring ) 可以被轉換成分解 Unicode (a 之後緊跟 ring above) 通過使用 decomposition ().

In Unicode, comparison is not necessarily possible and case conversion is very difficult at best. Unicode, covering the "entire" world, also includes most of the world's case and sorting problems. operator==() and friends will do comparison based purely on the numeric Unicode value (code point) of the characters, and toUpper () 和 toLower () will do case changes when the character has a well-defined uppercase/lowercase equivalent. For locale-dependent comparisons, use QString::localeAwareCompare ().

轉換函數包括 unicode () (到標量)、 toLatin1 () (到標量,但將所有非 Latin-1 字符轉換成 0)、 row () (給齣 Unicode 行)、 cell () (給齣 Unicode 單元格)、 digitValue () (給齣任意多數字字符的整數值)、及大量構造函數。

QChar 提供構造函數和鑄造運算符,使之易於轉換到和轉換自傳統 8 位 char 。若有定義 QT_NO_CAST_FROM_ASCII and QT_NO_CAST_TO_ASCII ,如闡述在 QString 文檔編製,將需要明確調用 fromLatin1 (),或使用 QLatin1Char ,以構造 QChar 從 8 位 char ,和將需要調用 toLatin1 () 以獲得 8 位值。

從 Qt 6.0 開始,大多數 QChar 構造函數都是 explicit . This is done to avoid dangerous mistakes when accidentally mixing integral types and strings.

更多信息見 關於 Unicode 字符數據庫 .

另請參閱 Unicode , QString ,和 QLatin1Char .

成員類型文檔編製

enum QChar:: 類彆

此枚舉映射 Unicode 字符類彆。

以下是 Unicode 規範字符:

常量 描述
QChar::Mark_NonSpacing 0 Unicode 類名 Mn
QChar::Mark_SpacingCombining 1 Unicode 類名 Mc
QChar::Mark_Enclosing 2 Unicode 類名 Me
QChar::Number_DecimalDigit 3 Unicode 類名 Nd
QChar::Number_Letter 4 Unicode 類名 Nl
QChar::Number_Other 5 Unicode 類名 No
QChar::Separator_Space 6 Unicode 類名 Zs
QChar::Separator_Line 7 Unicode 類名 Zl
QChar::Separator_Paragraph 8 Unicode 類名 Zp
QChar::Other_Control 9 Unicode 類名 Cc
QChar::Other_Format 10 Unicode 類名 Cf
QChar::Other_Surrogate 11 Unicode 類名 Cs
QChar::Other_PrivateUse 12 Unicode 類名 Co
QChar::Other_NotAssigned 13 Unicode 類名 Cn

以下是 Unicode 情報類彆:

常量 描述
QChar::Letter_Uppercase 14 Unicode 類名 Lu
QChar::Letter_Lowercase 15 Unicode 類名 Ll
QChar::Letter_Titlecase 16 Unicode 類名 Lt
QChar::Letter_Modifier 17 Unicode 類名 Lm
QChar::Letter_Other 18 Unicode 類名 Lo
QChar::Punctuation_Connector 19 Unicode 類名 Pc
QChar::Punctuation_Dash 20 Unicode 類名 Pd
QChar::Punctuation_Open 21 Unicode 類名 Ps
QChar::Punctuation_Close 22 Unicode 類名 Pe
QChar::Punctuation_InitialQuote 23 Unicode 類名 Pi
QChar::Punctuation_FinalQuote 24 Unicode 類名 Pf
QChar::Punctuation_Other 25 Unicode 類名 Po
QChar::Symbol_Math 26 Unicode 類名 Sm
QChar::Symbol_Currency 27 Unicode 類名 Sc
QChar::Symbol_Modifier 28 Unicode 類名 Sk
QChar::Symbol_Other 29 Unicode 類名 So

另請參閱 category ().

enum QChar:: Decomposition

此枚舉類型定義 Unicode 分解屬性。見 Unicode 標準 瞭解值的描述。

常量
QChar::NoDecomposition 0
QChar::Canonical 1
QChar::Circle 8
QChar::Compat 16
QChar::Final 6
QChar::Font 2
QChar::Fraction 17
QChar::Initial 4
QChar::Isolated 7
QChar::Medial 5
QChar::Narrow 13
QChar::NoBreak 3
QChar::Small 14
QChar::Square 15
QChar::Sub 10
QChar::Super 9
QChar::Vertical 11
QChar::Wide 12

另請參閱 decomposition ().

enum QChar:: Direction

此枚舉類型定義 Unicode 方嚮屬性。見 Unicode 標準 瞭解值的描述。

為符閤 C/C++ 命名約定,在 Unicode 標準使用的代碼前置 Dir。

常量
QChar::DirAL 13
QChar::DirAN 5
QChar::DirB 7
QChar::DirBN 18
QChar::DirCS 6
QChar::DirEN 2
QChar::DirES 3
QChar::DirET 4
QChar::DirFSI (since Qt 5.3) 21
QChar::DirL 0
QChar::DirLRE 11
QChar::DirLRI (since Qt 5.3) 19
QChar::DirLRO 12
QChar::DirNSM 17
QChar::DirON 10
QChar::DirPDF 16
QChar::DirPDI (since Qt 5.3) 22
QChar::DirR 1
QChar::DirRLE 14
QChar::DirRLI (since Qt 5.3) 20
QChar::DirRLO 15
QChar::DirS 8
QChar::DirWS 9

另請參閱 direction ().

enum QChar:: JoiningType

從 5.3 起

此枚舉類型定義 Unicode 聯接類型屬性。見 Unicode 標準 瞭解值的描述。

為符閤 C/C++ 命名約定,在 Unicode 標準使用的代碼前置 Joining_。

常量
QChar::Joining_None 0
QChar::Joining_Causing 1
QChar::Joining_Dual 2
QChar::Joining_Right 3
QChar::Joining_Left 4
QChar::Joining_Transparent 5

另請參閱 joiningType ().

enum QChar:: Script

此枚舉類型定義 Unicode 腳本特性值。

Unicode 腳本特性值的有關細節,見 Unicode 標準附錄 #24 .

為符閤 C/C++ 命名約定,在 Unicode 標準使用的代碼前置 Script_。

常量 描述
QChar::Script_Unknown 0 For unassigned, private-use, noncharacter, and surrogate code points.
QChar::Script_Inherited 1 For characters that may be used with multiple scripts and that inherit their script from the preceding characters. These include nonspacing marks, enclosing marks, and zero width joiner/non-joiner characters.
QChar::Script_Common 2 For characters that may be used with multiple scripts and that do not inherit their script from the preceding characters.
QChar::Script_Adlam (since Qt 5.11) 132
QChar::Script_Ahom (since Qt 5.6) 126
QChar::Script_AnatolianHieroglyphs (since Qt 5.6) 127
QChar::Script_Arabic 8
QChar::Script_Armenian 6
QChar::Script_Avestan 80
QChar::Script_Balinese 62
QChar::Script_Bamum 84
QChar::Script_BassaVah (since Qt 5.5) 104
QChar::Script_Batak 93
QChar::Script_Bengali 12
QChar::Script_Bhaiksuki (since Qt 5.11) 133
QChar::Script_Bopomofo 36
QChar::Script_Brahmi 94
QChar::Script_Braille 54
QChar::Script_Buginese 55
QChar::Script_Buhid 44
QChar::Script_CanadianAboriginal 29
QChar::Script_Carian 75
QChar::Script_CaucasianAlbanian (since Qt 5.5) 103
QChar::Script_Chakma 96
QChar::Script_Cham 77
QChar::Script_Cherokee 28
QChar::Script_Chorasmian (since Qt 5.15) 153
QChar::Script_Coptic 46
QChar::Script_Cuneiform 63
QChar::Script_Cypriot 53
QChar::Script_CyproMinoan (since Qt 6.3) 157
QChar::Script_Cyrillic 5
QChar::Script_Deseret 41
QChar::Script_Devanagari 11
QChar::Script_DivesAkuru (since Qt 5.15) 154
QChar::Script_Dogra (since Qt 5.15) 142
QChar::Script_Duployan (since Qt 5.5) 105
QChar::Script_EgyptianHieroglyphs 81
QChar::Script_Elbasan (since Qt 5.5) 106
QChar::Script_Elymaic (since Qt 5.15) 149
QChar::Script_Ethiopic 27
QChar::Script_Garay (since Qt 6.9) 164
QChar::Script_Georgian 25
QChar::Script_Glagolitic 57
QChar::Script_Gothic 40
QChar::Script_Grantha (since Qt 5.5) 107
QChar::Script_Greek 4
QChar::Script_Gujarati 14
QChar::Script_GunjalaGondi (since Qt 5.15) 143
QChar::Script_Gurmukhi 13
QChar::Script_GurungKhema (since Qt 6.9) 165
QChar::Script_Han 37
QChar::Script_Hangul 26
QChar::Script_HanifiRohingya (since Qt 5.15) 144
QChar::Script_Hanunoo 43
QChar::Script_Hatran (since Qt 5.6) 128
QChar::Script_Hebrew 7
QChar::Script_Hiragana 34
QChar::Script_ImperialAramaic 87
QChar::Script_InscriptionalPahlavi 90
QChar::Script_InscriptionalParthian 89
QChar::Script_Javanese 85
QChar::Script_Kaithi 92
QChar::Script_Kannada 18
QChar::Script_Katakana 35
QChar::Script_Kawi (since Qt 6.5) 162
QChar::Script_KayahLi 72
QChar::Script_Kharoshthi 61
QChar::Script_KhitanSmallScript (since Qt 5.15) 155
QChar::Script_Khmer 32
QChar::Script_Khojki (since Qt 5.5) 109
QChar::Script_Khudawadi (since Qt 5.5) 123
QChar::Script_KiratRai (since Qt 6.9) 166
QChar::Script_Lao 22
QChar::Script_Latin 3
QChar::Script_Lepcha 68
QChar::Script_Limbu 47
QChar::Script_LinearA (since Qt 5.5) 110
QChar::Script_LinearB 49
QChar::Script_Lisu 83
QChar::Script_Lycian 74
QChar::Script_Lydian 76
QChar::Script_Mahajani (since Qt 5.5) 111
QChar::Script_Makasar (since Qt 5.15) 145
QChar::Script_Malayalam 19
QChar::Script_Mandaic 95
QChar::Script_Manichaean (since Qt 5.5) 112
QChar::Script_Marchen (since Qt 5.11) 134
QChar::Script_MasaramGondi (since Qt 5.11) 138
QChar::Script_Medefaidrin (since Qt 5.15) 146
QChar::Script_MeeteiMayek 86
QChar::Script_MendeKikakui (since Qt 5.5) 113
QChar::Script_MeroiticCursive 97
QChar::Script_MeroiticHieroglyphs 98
QChar::Script_Miao 99
QChar::Script_Modi (since Qt 5.5) 114
QChar::Script_Mongolian 33
QChar::Script_Mro (since Qt 5.5) 115
QChar::Script_Multani (since Qt 5.6) 129
QChar::Script_Myanmar 24
QChar::Script_Nabataean (since Qt 5.5) 117
QChar::Script_NagMundari (since Qt 6.3) 163
QChar::Script_Nandinagari (since Qt 5.15) 150
QChar::Script_Newa (since Qt 5.11) 135
QChar::Script_NewTaiLue 56
QChar::Script_Nko 66
QChar::Script_Nushu (since Qt 5.11) 139
QChar::Script_NyiakengPuachueHmong (since Qt 5.15) 151
QChar::Script_Ogham 30
QChar::Script_OlChiki 69
QChar::Script_OlOnal (since Qt 6.9) 167
QChar::Script_OldHungarian (since Qt 5.6) 130
QChar::Script_OldItalic 39
QChar::Script_OldNorthArabian (since Qt 5.5) 116
QChar::Script_OldPermic (since Qt 5.5) 120
QChar::Script_OldPersian 60
QChar::Script_OldSogdian (since Qt 5.15) 147
QChar::Script_OldSouthArabian 88
QChar::Script_OldTurkic 91
QChar::Script_OldUyghur (since Qt 6.3) 158
QChar::Script_Oriya 15
QChar::Script_Osage (since Qt 5.11) 136
QChar::Script_Osmanya 52
QChar::Script_PahawhHmong (since Qt 5.5) 108
QChar::Script_Palmyrene (since Qt 5.5) 118
QChar::Script_PauCinHau (since Qt 5.5) 119
QChar::Script_PhagsPa 65
QChar::Script_Phoenician 64
QChar::Script_PsalterPahlavi (since Qt 5.5) 121
QChar::Script_Rejang 73
QChar::Script_Runic 31
QChar::Script_Samaritan 82
QChar::Script_Saurashtra 71
QChar::Script_Sharada 100
QChar::Script_Shavian 51
QChar::Script_Siddham (since Qt 5.5) 122
QChar::Script_SignWriting (since Qt 5.6) 131
QChar::Script_Sinhala 20
QChar::Script_Sogdian (since Qt 5.15) 148
QChar::Script_SoraSompeng 101
QChar::Script_Soyombo (since Qt 5.11) 140
QChar::Script_Sundanese 67
QChar::Script_Sunuwar (since Qt 6.9) 168
QChar::Script_SylotiNagri 59
QChar::Script_Syriac 9
QChar::Script_Tagalog 42
QChar::Script_Tagbanwa 45
QChar::Script_TaiLe 48
QChar::Script_TaiTham 78
QChar::Script_TaiViet 79
QChar::Script_Takri 102
QChar::Script_Tamil 16
QChar::Script_Tangut (since Qt 5.11) 137
QChar::Script_Tangsa (since Qt 6.3) 159
QChar::Script_Telugu 17
QChar::Script_Thaana 10
QChar::Script_Thai 21
QChar::Script_Tibetan 23
QChar::Script_Tifinagh 58
QChar::Script_Tirhuta (since Qt 5.5) 124
QChar::Script_Todhri (since Qt 6.9) 169
QChar::Script_Toto (since Qt 6.3) 160
QChar::Script_TuluTigalari (since Qt 6.9) 170
QChar::Script_Ugaritic 50
QChar::Script_Vai 70
QChar::Script_Vithkuqi (since Qt 6.3) 161
QChar::Script_Wancho (since Qt 5.15) 152
QChar::Script_WarangCiti (since Qt 5.5) 125
QChar::Script_Yezidi (since Qt 5.15) 156
QChar::Script_Yi 38
QChar::Script_ZanabazarSquare (since Qt 5.11) 141

另請參閱 script ().

enum QChar:: SpecialCharacter

常量 描述
QChar::Null 0x0000 A QChar 具有此值 isNull ().
QChar::Tabulation 0x0009 製錶符。
QChar::LineFeed 0x000a
QChar::FormFeed 0x000c
QChar::CarriageReturn 0x000d
QChar::Space 0x0020
QChar::Nbsp 0x00a0 不間斷空格。
QChar::SoftHyphen 0x00ad
QChar::ReplacementCharacter 0xfffd 展示字符,當對於某個代碼點字體沒有字形時。經常使用特殊 ? (問號) 字符。編解碼器使用此代碼點,當輸入數據無法以 Unicode 錶示時。
QChar::ObjectReplacementCharacter 0xfffc 用於錶示無法呈現的那些對象 (譬如:圖像)。
QChar::ByteOrderMark 0xfeff
QChar::ByteOrderSwapped 0xfffe
QChar::ParagraphSeparator 0x2029
QChar::LineSeparator 0x2028
QChar::VisualTabCharacter (since Qt 6.2) 0x2192 用於以水平箭頭方式錶示 Tab (製錶符)。
QChar::LastValidCodePoint 0x10ffff

enum QChar:: UnicodeVersion

指定哪個版本的 Unicode 標準 引入某個字符。

常量 描述
QChar::Unicode_1_1 1 版本 1.1
QChar::Unicode_2_0 2 版本 2.0
QChar::Unicode_2_1_2 3 版本 2.1.2
QChar::Unicode_3_0 4 版本 3.0
QChar::Unicode_3_1 5 版本 3.1
QChar::Unicode_3_2 6 版本 3.2
QChar::Unicode_4_0 7 版本 4.0
QChar::Unicode_4_1 8 版本 4.1
QChar::Unicode_5_0 9 版本 5.0
QChar::Unicode_5_1 10 版本 5.1
QChar::Unicode_5_2 11 版本 5.2
QChar::Unicode_6_0 12 版本 6.0
QChar::Unicode_6_1 13 版本 6.1
QChar::Unicode_6_2 14 版本 6.2
QChar::Unicode_6_3 (since Qt 5.3) 15 版本 6.3
QChar::Unicode_7_0 (since Qt 5.5) 16 版本 7.0
QChar::Unicode_8_0 (since Qt 5.6) 17 版本 8.0
QChar::Unicode_9_0 (since Qt 5.11) 18 版本 9.0
QChar::Unicode_10_0 (since Qt 5.11) 19 版本 10.0
QChar::Unicode_11_0 (since Qt 5.15) 20 版本 11.0
QChar::Unicode_12_0 (since Qt 5.15) 21 版本 12.0
QChar::Unicode_12_1 (since Qt 5.15) 22 版本 12.1
QChar::Unicode_13_0 (since Qt 5.15) 23 版本 13.0
QChar::Unicode_14_0 (since Qt 6.3) 24 版本 14.0
QChar::Unicode_15_0 (since Qt 6.5) 25 版本 15.0
QChar::Unicode_15_1 (since Qt 6.8) 26 Version 15.1
QChar::Unicode_16_0 (since Qt 6.9) 27 Version 16.0
QChar::Unicode_Unassigned 0 The value is not assigned to any character in version 8.0 of Unicode.

另請參閱 unicodeVersion () 和 currentUnicodeVersion ().

成員函數文檔編製

[constexpr noexcept] QChar:: QChar ()

構造 null QChar('\0')。

另請參閱 isNull ().

[constexpr noexcept] QChar:: QChar ( QChar::SpecialCharacter ch )

構造 QChar 為預定義字符值 ch .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[constexpr noexcept] QChar:: QChar ( QLatin1Char ch )

構造的 QChar 對應 ASCII/Latin-1 字符 ch .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[constexpr noexcept] QChar:: QChar ( char ch )

構造的 QChar 對應 ASCII/Latin-1 字符 ch .

注意: 此構造函數不可用當 QT_NO_CAST_FROM_ASCII 有定義。

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

另請參閱 QT_NO_CAST_FROM_ASCII .

[constexpr noexcept] QChar:: QChar ( char16_t ch )

構造的 QChar 對應 UTF-16 字符 ch .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[default] QChar:: QChar ( char32_t code )

構造 QChar 為字符具有 Unicode 代碼點 code .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[explicit constexpr noexcept] QChar:: QChar ( int code )

構造 QChar 為字符具有 Unicode 代碼點 code .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[constexpr noexcept] QChar:: QChar ( short code )

構造 QChar 為字符具有 Unicode 代碼點 code .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[explicit constexpr noexcept] QChar:: QChar ( uchar ch )

構造的 QChar 對應 ASCII/Latin-1 字符 ch .

注意: 此構造函數不可用當 QT_NO_CAST_FROM_ASCII or QT_RESTRICTED_CAST_FROM_ASCII 有定義。

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

另請參閱 QT_NO_CAST_FROM_ASCII and QT_RESTRICTED_CAST_FROM_ASCII .

[explicit constexpr noexcept] QChar:: QChar ( uint code )

構造 QChar 為字符具有 Unicode 代碼點 code .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[constexpr noexcept] QChar:: QChar ( ushort code )

構造 QChar 為字符具有 Unicode 代碼點 code .

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[constexpr noexcept] QChar:: QChar ( wchar_t ch )

構造的 QChar 對應寬字符 ch .

注意: 此構造函數隻可用於 Windows。

注意: Since Qt 6.9, implicit conversions are disabled for this constructor. That means it accepts only the constructor argument type and not everything that implicitly converts to it. A backwards-compatible fix is to explicitly cast to one of the supported argument types of QChar constructors.

[explicit constexpr noexcept] QChar:: QChar ( uchar cell , uchar row )

構造 QChar 為 Unicode 單元格 cell 按行 row .

另請參閱 cell () 和 row ().

[noexcept] QChar::Category QChar:: category () const

返迴字符類彆。

[static noexcept] QChar::Category QChar:: category ( char32_t ucs4 )

返迴的 UCS-4 編碼字符類彆指定通過 ucs4 .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] uchar QChar:: cell () const

返迴 Unicode 字符單元格 (最低有效字節)。

另請參閱 row ().

[noexcept] unsigned char QChar:: combiningClass () const

Returns the combining class for the character as defined in the Unicode standard. This is mainly useful as a positioning hint for marks attached to a base character.

The Qt text rendering engine uses this information to correctly position non-spacing marks around a base character.

[static noexcept] unsigned char QChar:: combiningClass ( char32_t ucs4 )

返迴 UCS-4 編碼字符組閤類指定通過 ucs4 ,如 Unicode 標準定義的。

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[static noexcept] QChar::UnicodeVersion QChar:: currentUnicodeVersion ()

返迴最近支持的 Unicode 版本。

QString QChar:: decomposition () const

將字符分解成其組成部分。返迴空字符串,若不存在分解。

[static] QString QChar:: decomposition ( char32_t ucs4 )

分解 UCS-4 編碼字符指定通過 ucs4 成其組成部分。返迴空字符串,若不存在分解。

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[noexcept] QChar::Decomposition QChar:: decompositionTag () const

返迴字符閤成定義標簽。返迴 QChar::NoDecomposition 若不存在分解。

[static noexcept] QChar::Decomposition QChar:: decompositionTag ( char32_t ucs4 )

返迴 UCS-4 編碼字符閤成定義標簽指定通過 ucs4 。返迴 QChar::NoDecomposition 若不存在分解。

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[noexcept] int QChar:: digitValue () const

返迴數字的數值,或 -1 若字符不是數字。

[static noexcept] int QChar:: digitValue ( char32_t ucs4 )

返迴數字的數值指定通過 UCS-4 編碼字符 ucs4 ,或 -1 若字符不是數字。

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[noexcept] QChar::Direction QChar:: direction () const

返迴字符方嚮。

[static noexcept] QChar::Direction QChar:: direction ( char32_t ucs4 )

返迴 UCS-4 編碼字符方嚮指定通過 ucs4 .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[static constexpr noexcept] QChar QChar:: fromLatin1 ( char c )

轉換 Latin-1 字符 c 到其等價 QChar 。這主要用於非國際化軟件。

替代是使用 QLatin1Char .

另請參閱 toLatin1 () 和 unicode ().

[static constexpr noexcept, since 6.0] QChar QChar:: fromUcs2 ( char16_t c )

構造 QChar 從 UTF-16 字符 c .

該函數在 Qt 6.0 引入。

另請參閱 fromUcs4 ().

[static constexpr noexcept, since 6.0] auto QChar:: fromUcs4 ( char32_t c )

返迴匿名結構體

  • 包含 char16_t chars[2] 數組,
  • 可以隱式轉換成 QStringView ,和
  • 采用 C++11 範圍 for 循環迭代。

c 要求代理, chars[0] 包含高代理和 chars[1] 低代理,且 QStringView 擁有大小 2。否則, chars[0] 包含 c and chars[1] is null ,和 QStringView 擁有大小 1。

這允許輕鬆使用結果:

QString s;
s += QChar::fromUcs4(ch);
					
for (char16_t c16 : QChar::fromUcs4(ch))
    use(c16);
					

該函數在 Qt 6.0 引入。

另請參閱 fromUcs2 () 和 requiresSurrogates ().

[noexcept] bool QChar:: hasMirrored () const

返迴 true 當應反轉字符時,若文本方嚮相反;否則返迴 false .

快一點相當於 (ch. mirroredChar () != ch).

另請參閱 mirroredChar ().

[static noexcept] bool QChar:: hasMirrored ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 應反轉,若文本方嚮相反;否則返迴 false .

快一點相當於 ( QChar::mirroredChar (ucs4) != ucs4).

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 mirroredChar ().

[static constexpr noexcept] char16_t QChar:: highSurrogate ( char32_t ucs4 )

Returns the high surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 ushort .

[constexpr noexcept] bool QChar:: isDigit () const

返迴 true 若字符是十進製數字 ( Number_DecimalDigit );否則返迴 false .

另請參閱 isNumber ().

[static constexpr noexcept] bool QChar:: isDigit ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是十進製數字 ( Number_DecimalDigit );否則返迴 false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 isNumber ().

[constexpr noexcept] bool QChar:: isHighSurrogate () const

返迴 true QChar 是 UTF16 代理的高部分 (例如:若其代碼點在範圍 [0xd800..0xdbff]);否則 false。

[static constexpr noexcept] bool QChar:: isHighSurrogate ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是 UTF16 代理的高部分 (例如:若其代碼點在範圍 [0xd800..0xdbff]);否則 false。

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isLetter () const

返迴 true 若字符是字母 (Letter_* 類彆);否則返迴 false .

[static constexpr noexcept] bool QChar:: isLetter ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是字母 (Letter_* 類彆);否則返迴 false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isLetterOrNumber () const

返迴 true 若字符是字母或數字 (Letter_* 或 Number_* 類彆);否則返迴 false .

[static constexpr noexcept] bool QChar:: isLetterOrNumber ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是字母或數字 (Letter_* 或 Number_* 類彆);否則返迴 false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isLowSurrogate () const

返迴 true QChar is the low part of a UTF16 surrogate (for example if its code point is in range [0xdc00..0xdfff]); false otherwise.

[static constexpr noexcept] bool QChar:: isLowSurrogate ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 is the low part of a UTF16 surrogate (for example if its code point is in range [0xdc00..0xdfff]); false otherwise.

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isLower () const

返迴 true 若字符是小寫字母,例如 category () 是 Letter_Lowercase .

另請參閱 isUpper (), toLower (),和 toUpper ().

[static constexpr noexcept] bool QChar:: isLower ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是小寫字母,例如 category () 是 Letter_Lowercase .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 isUpper (), toLower (),和 toUpper ().

[noexcept] bool QChar:: isMark () const

返迴 true 若字符為標記 (Mark_* 類彆);否則返迴 false .

QChar::Category 瞭解一般標記的更多信息。

[static noexcept] bool QChar:: isMark ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 為標記 (Mark_* 類彆); false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isNonCharacter () const

返迴 true QChar 為非字符;否則 false。

Unicode has a certain number of code points that are classified as "non-characters:" that is, they can be used for internal purposes in applications but cannot be used for text interchange. Those are the last two entries each Unicode Plane ([0xfffe..0xffff], [0x1fffe..0x1ffff], etc.) as well as the entries in range [0xfdd0..0xfdef].

[static constexpr noexcept] bool QChar:: isNonCharacter ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 為非字符;否則 false。

Unicode has a certain number of code points that are classified as "non-characters:" that is, they can be used for internal purposes in applications but cannot be used for text interchange. Those are the last two entries each Unicode Plane ([0xfffe..0xffff], [0x1fffe..0x1ffff], etc.) as well as the entries in range [0xfdd0..0xfdef].

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isNull () const

返迴 true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false .

[constexpr noexcept] bool QChar:: isNumber () const

返迴 true if the character is a number (Number_* categories, not just 0-9); otherwise returns false .

另請參閱 isDigit ().

[static constexpr noexcept] bool QChar:: isNumber ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 is a number (Number_* categories, not just 0-9); otherwise returns false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 isDigit ().

[noexcept] bool QChar:: isPrint () const

返迴 true if the character is a printable character; otherwise returns false . This is any character not of category Other_ *.

Note that this gives no indication of whether the character is available in a particular font.

[static noexcept] bool QChar:: isPrint ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 is a printable character; otherwise returns false . This is any character not of category Other_ *.

Note that this gives no indication of whether the character is available in a particular font.

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[noexcept] bool QChar:: isPunct () const

返迴 true 若字符為標點符號標記 (Punctuation_* 類彆);否則返迴 false .

[static noexcept] bool QChar:: isPunct ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 為標點符號標記 (Punctuation_* 類彆);否則返迴 false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isSpace () const

返迴 true if the character is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false .

[static constexpr noexcept] bool QChar:: isSpace ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 is a separator character (Separator_* categories or certain code points from Other_Control category); otherwise returns false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isSurrogate () const

返迴 true QChar contains a code point that is in either the high or the low part of the UTF-16 surrogate range (for example if its code point is in range [0xd800..0xdfff]); false otherwise.

[static constexpr noexcept] bool QChar:: isSurrogate ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 contains a code point that is in either the high or the low part of the UTF-16 surrogate range (for example if its code point is in range [0xd800..0xdfff]); false otherwise.

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[noexcept] bool QChar:: isSymbol () const

返迴 true 若字符為符號 (Symbol_* 類彆);否則返迴 false .

[static noexcept] bool QChar:: isSymbol ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 為符號 (Symbol_* 類彆);否則返迴 false .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[constexpr noexcept] bool QChar:: isTitleCase () const

返迴 true 若字符為標題大小寫字母,例如 category () 是 Letter_Titlecase .

另請參閱 isLower (), toUpper (), toLower (),和 toTitleCase ().

[static constexpr noexcept] bool QChar:: isTitleCase ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 為標題大小寫字母,例如 category () 是 Letter_Titlecase .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 isLower (), toUpper (), toLower (),和 toTitleCase ().

[constexpr noexcept] bool QChar:: isUpper () const

返迴 true 若字符為大寫字母,例如 category () 是 Letter_Uppercase .

另請參閱 isLower (), toUpper (),和 toLower ().

[static constexpr noexcept] bool QChar:: isUpper ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 是大寫字母,例如 category () 是 Letter_Uppercase .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

另請參閱 isLower (), toUpper (),和 toLower ().

[noexcept] QChar::JoiningType QChar:: joiningType () const

Returns information about the joining type attributes of the character (needed for certain languages such as Arabic or Syriac).

[static noexcept] QChar::JoiningType QChar:: joiningType ( char32_t ucs4 )

Returns information about the joining type attributes of the UCS-4-encoded character specified by ucs4 (needed for certain languages such as Arabic or Syriac).

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[static constexpr noexcept] char16_t QChar:: lowSurrogate ( char32_t ucs4 )

Returns the low surrogate part of a UCS-4-encoded code point. The returned result is undefined if ucs4 is smaller than 0x10000.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 ushort .

[noexcept] QChar QChar:: mirroredChar () const

Returns the mirrored character if this character is a mirrored character; otherwise returns the character itself.

另請參閱 hasMirrored ().

[static noexcept] char32_t QChar:: mirroredChar ( char32_t ucs4 )

Returns the mirrored character if the UCS-4-encoded character specified by ucs4 is a mirrored character; otherwise returns the character itself.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 uint .

這是重載函數。

另請參閱 hasMirrored ().

[static constexpr noexcept] bool QChar:: requiresSurrogates ( char32_t ucs4 )

返迴 true 若 UCS-4 編碼字符指定通過 ucs4 can be split into the high and low parts of a UTF16 surrogate (for example if its code point is greater than or equals to 0x10000); false otherwise.

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

[constexpr noexcept] uchar QChar:: row () const

Returns the row (most significant byte) of the Unicode character.

另請參閱 cell ().

[noexcept] QChar::Script QChar:: script () const

返迴用於此字符的 Unicode 腳本特性值。

[static noexcept] QChar::Script QChar:: script ( char32_t ucs4 )

Returns the Unicode script property value for the character specified in its UCS-4-encoded form as ucs4 .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

[static constexpr noexcept] char32_t QChar:: surrogateToUcs4 ( char16_t high , char16_t low )

轉換 UTF16 代理對采用給定 high and low 值,到其 UCS-4 編碼代碼點。

注意: 在 Qt 6 之前,此函數接受 ushort 自變量並返迴 uint .

[static constexpr noexcept] char32_t QChar:: surrogateToUcs4 ( QChar high , QChar low )

轉換 UTF16 代理對 ( high , low ) 到其 UCS-4 編碼代碼點。

注意: 在 Qt 6 之前,此函數返迴 uint .

這是重載函數。

[noexcept] QChar QChar:: toCaseFolded () const

Returns the case folded equivalent of the character. For most Unicode characters this is the same as toLower ().

[static noexcept] char32_t QChar:: toCaseFolded ( char32_t ucs4 )

Returns the case folded equivalent of the UCS-4-encoded character specified by ucs4 . For most Unicode characters this is the same as toLower ().

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 uint .

這是重載函數。

[constexpr noexcept] char QChar:: toLatin1 () const

返迴的 Latin-1 字符相當於 QChar ,或 0。這主要用於非國際化軟件。

注意: It is not possible to distinguish a non-Latin-1 character from a Latin-1 0 (NUL) character. Prefer to use unicode (), which does not have this ambiguity.

另請參閱 unicode ().

[noexcept] QChar QChar:: toLower () const

Returns the lowercase equivalent if the character is uppercase or titlecase; otherwise returns the character itself.

[static noexcept] char32_t QChar:: toLower ( char32_t ucs4 )

Returns the lowercase equivalent of the UCS-4-encoded character specified by ucs4 if the character is uppercase or titlecase; otherwise returns the character itself.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 uint .

這是重載函數。

[noexcept] QChar QChar:: toTitleCase () const

Returns the title case equivalent if the character is lowercase or uppercase; otherwise returns the character itself.

[static noexcept] char32_t QChar:: toTitleCase ( char32_t ucs4 )

Returns the title case equivalent of the UCS-4-encoded character specified by ucs4 if the character is lowercase or uppercase; otherwise returns the character itself.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 uint .

這是重載函數。

[noexcept] QChar QChar:: toUpper () const

Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself.

注意: This function also returns the original character in the rare case of the uppercase form of the character requiring two or more characters.

另請參閱 QString::toUpper ().

[static noexcept] char32_t QChar:: toUpper ( char32_t ucs4 )

返迴 UCS-4 編碼字符的大寫等價,指定通過 ucs4 若字符為小寫 (或標題大小寫);否則,返迴字符自身。

注意: This function also returns the original character in the rare case of the uppercase form of the character requiring two or more characters.

注意: 在 Qt 6 之前,此函數接受 uint 自變量並返迴 uint .

這是重載函數。

另請參閱 QString::toUpper ().

[constexpr noexcept] char16_t &QChar:: unicode ()

返迴數值 Unicode 值的引用對於 QChar .

[constexpr noexcept] char16_t QChar:: unicode () const

返迴數值 Unicode 值對於 QChar .

[noexcept] QChar::UnicodeVersion QChar:: unicodeVersion () const

返迴引入此字符的 Unicode 版本。

[static noexcept] QChar::UnicodeVersion QChar:: unicodeVersion ( char32_t ucs4 )

返迴引入字符的 Unicode 版本, UCS-4 編碼形式的指定為 ucs4 .

注意: 在 Qt 6 之前,此函數接受 uint 自變量。

這是重載函數。

相關非成員

[constexpr noexcept] bool operator!= (const QChar & c1 , const QChar & c2 )

返迴 true if c1 and c2 不是相同 Unicode 字符;否則返迴 false .

[constexpr noexcept] bool operator< (const QChar & c1 , const QChar & c2 )

返迴 true 若數值 Unicode 值對於 c1 小於 c2 ;否則返迴 false .

QDataStream & operator<< ( QDataStream & out , QChar chr )

寫入字符 chr 到流 out .

另請參閱 序列化 Qt 數據類型 .

[constexpr noexcept] bool operator<= (const QChar & c1 , const QChar & c2 )

返迴 true 若數值 Unicode 值對於 c1 <= c2 ;否則返迴 false .

[constexpr noexcept] bool operator== (const QChar & c1 , const QChar & c2 )

返迴 true if c1 and c2 是相同 Unicode 字符;否則返迴 false .

[constexpr noexcept] bool operator> (const QChar & c1 , const QChar & c2 )

返迴 true 若數值 Unicode 值對於 c1 大於 c2 ;否則返迴 false .

[constexpr noexcept] bool operator>= (const QChar & c1 , const QChar & c2 )

返迴 true 若數值 Unicode 值對於 c1 >= c2 ;否則返迴 false .

QDataStream & operator>> ( QDataStream & in , QChar & chr )

讀取字符從流 in 到字符 chr .

另請參閱 序列化 Qt 數據類型 .