Nesta página

QNdefNfcIconRecord Class

A classe QNdefNfcIconRecord fornece um registro MIME NFC para armazenar um ícone. Mais...

Cabeçalho: #include <QNdefNfcIconRecord>
CMake: find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt6::Nfc)
qmake: QT += nfc
Desde: Qt 5.2
Herdado de: QNdefRecord

Funções públicas

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

Descrição detalhada

Esta classe encapsula os dados da imagem em uma mensagem NDEF. Ela fornece um registro NDEF do tipo ` QNdefRecord::Mime`. O método ` payload()` contém os dados brutos da imagem.

Documentação das funções de membro

QNdefNfcIconRecord::QNdefNfcIconRecord()

Cria um registro NDEF vazio do tipo QNdefRecord::Mime.

QNdefNfcIconRecord::QNdefNfcIconRecord(const QNdefRecord &other)

Cria um registro de ícone NDEF que é uma cópia de other.

QByteArray QNdefNfcIconRecord::data() const

Retorna os dados do ícone como ` QByteArray`.

Aviso: Recomenda-se aos desenvolvedoresde aplicativos que validem os dados retornados antes de processá-los. Consulte Considerações de segurança do Qt NFC para obter orientações.

Consulte também ` setData()`.

void QNdefNfcIconRecord::setData(const QByteArray &data)

Define o conteúdo do registro do ícone como data.

Veja também data().

© 2026 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.