The QNdefNfcTextRecord class provides an NFC RTD-Text. 更多...
头: | #include <QNdefNfcTextRecord> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt6::Nfc) |
qmake: | QT += nfc |
继承: | QNdefRecord |
enum | 编码 { Utf8, Utf16 } |
QNdefNfcTextRecord () | |
QNdefNfcTextRecord (const QNdefRecord & other ) | |
QNdefNfcTextRecord::Encoding | encoding () const |
QString | locale () const |
void | setEncoding (QNdefNfcTextRecord::Encoding encoding ) |
void | setLocale (const QString & locale ) |
void | setText (const QString text ) |
QString | text () const |
RTD-Text encapsulates a user displayable text record.
This enum describes the text encoding standard used.
常量 | 值 | 描述 |
---|---|---|
QNdefNfcTextRecord::Utf8
|
0
|
The text is encoded with UTF-8. |
QNdefNfcTextRecord::Utf16
|
1
|
The text is encoding with UTF-16. |
Constructs an empty NFC text record of type QNdefRecord::NfcRtd .
Constructs a new NFC text record that is a copy of other .
Returns the encoding of the contents.
另请参阅 setEncoding ().
Returns the locale of the text record.
另请参阅 setLocale ().
Sets the enconding of the contents to encoding .
另请参阅 encoding ().
Sets the locale of the text record to locale .
另请参阅 locale ().
Sets the contents of the text record to text .
另请参阅 text ().
Returns the contents of the text record as a string.
另请参阅 setText ().