Qt NFC

NFC API 在启用 NFC 的设备之间提供连接。

目前,API 支持在 Android ,和 Linux 使用 Neard v0.14 或更高版本。

概述

NFC is an extremely short-range (less than 20 centimeters) wireless technology and has a maximum transfer rate of 424 kbit/s. NFC is ideal for transferring small packets of data when two devices are touched together.

The NFC API provides APIs for interacting with NFC Forum Tags and NFC Forum Devices, including target detection and loss, registering NDEF message handlers, reading and writing NDEF messages on NFC Forum Tags and sending tag specific commands.

快速入门

要使用 C++ 库在应用程序,添加以下配置选项到 .pro 文件:

QT += nfc
					

要在应用程序中使用模块的类,需要以下 import 语句在 .qml 文件:

import QtNfc 5.12
					

许可

Qt NFC 在商业许可下是可用的来自 Qt 公司 。此外,它在自由软件许可下也是可用的。从 Qt 5.4 起,这些自由软件许可是 GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。

指南

参考

日志类别

QtNfc 模块导出下列 日志类别 :

日志类别 描述
qt.nfc.neard 启用 Neard/Linux 实现的日志

范例