QNdefNfcIconRecord Class

QNdefNfcIconRecord 类提供了一个用于保存图标的 NFC MIME 记录。更多

Header: #include <QNdefNfcIconRecord>
CMake: find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt6::Nfc)
qmake: QT += nfc
Qt 5.2
继承: QNdefRecord

公共函数

QNdefNfcIconRecord()
QNdefNfcIconRecord(const QNdefRecord &other)
QByteArray data() const
void setData(const QByteArray &data)

详细说明

该类将图像数据封装到 NDEF 消息中。它提供了一个QNdefRecord::Mime 类型的 NDEF 记录。payload() 包含原始图像数据。

成员函数文档

QNdefNfcIconRecord::QNdefNfcIconRecord()

构造一个QNdefRecord::Mime 类型的空 NDEF 记录。

QNdefNfcIconRecord::QNdefNfcIconRecord(const QNdefRecord &other)

构建一个 NDEF 图标记录,它是other 的副本。

QByteArray QNdefNfcIconRecord::data() const

QByteArray 的形式返回图标数据。

另请参阅 setData() 。

void QNdefNfcIconRecord::setData(const QByteArray &data)

将图标记录的内容设置为data

另请参阅 data() 。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.