QNdefMessage Class
The QNdefMessage class provides an NFC NDEF message. More...
Header: | #include <QNdefMessage> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Nfc) target_link_libraries(mytarget PRIVATE Qt6::Nfc) |
qmake: | QT += nfc |
Since: | Qt 5.2 |
Public Functions
QNdefMessage() | |
QNdefMessage(const int &records) | |
QNdefMessage(const class QNdefMessage &message) | |
(since 6.2) QNdefMessage & | operator=(class QNdefMessage &&other) |
(since 6.2) QNdefMessage & | operator=(const class QNdefMessage &other) |
Detailed Description
A QNdefMessage is a collection of 0 or more QNdefRecords. QNdefMessage inherits from QList<QNdefRecord> and therefore the standard QList functions can be used to manipulate the NDEF records in the message.
NDEF messages can be parsed from a byte array conforming to the NFC Data Exchange Format technical specification by using the fromByteArray() static function. Conversely QNdefMessages can be converted into a byte array with the toByteArray() function.
Member Function Documentation
[constexpr noexcept]
QNdefMessage::QNdefMessage()
Constructs a new empty NDEF message.
[explicit]
QNdefMessage::QNdefMessage(const int &records)
Constructs a new NDEF message that contains all of the records in records.
[default]
QNdefMessage::QNdefMessage(const class QNdefMessage &message)
Constructs a new NDEF message that is a copy of message.
[default, since 6.2]
QNdefMessage &QNdefMessage::operator=(class QNdefMessage &&other)
This is an overloaded function.
Move assignment operator from QList<QNdefRecord>. Moves the other list of NDEF records to this NDEF record list.
After the operation, other will be empty.
This function was introduced in Qt 6.2.
[default, since 6.2]
QNdefMessage &QNdefMessage::operator=(const class QNdefMessage &other)
This is an overloaded function.
Copy assignment operator from QList<QNdefRecord>. Assigns the other list of NDEF records to this NDEF record list.
After the operation, other and *this
will be equal.
This function was introduced in Qt 6.2.