本页内容

Qt NFC C++ Classes

用于访问NFC Forum标签的API。更多内容...

类

QNdefFilter

用于匹配 NDEF 消息的过滤器

QNdefFilter::Record

QNdefFilter::Record 结构体包含有关过滤器记录的信息

QNdefMessage

NFC NDEF 消息

QNdefNfcIconRecord

用于存储图标的NFC MIME记录

QNdefNfcSmartPosterRecord

NFC RTD-SmartPoster

QNdefNfcTextRecord

NFC RTD-Text

QNdefNfcUriRecord

NFC RTD-URI

QNdefRecord

NFC NDEF 记录

QNearFieldManager

访问 NFC 事件的通知

QNearFieldTarget

用于与目标设备通信的接口

QNearFieldTarget::RequestId

请求 ID 句柄

详细说明

该 Qt NFC C++ API 允许应用程序访问 NFC Forum 标签。

使用该模块

要使用 Qt 模块,需要直接或通过其他依赖项与模块库进行链接。包括CMake和qmake 在内的多种构建工具都对此提供了专门的支持。

使用 CMake 进行构建

使用find_package() 命令在Qt6 软件包中定位所需的模块组件:

find_package(Qt6 REQUIRED COMPONENTS Nfc)
target_link_libraries(mytarget PRIVATE Qt::Nfc)

使用 qmake 构建

要配置模块以便使用 qmake 进行构建,请在项目的 .pro 文件中将该模块作为QT 变量的值添加进去:

QT += nfc

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