支持的 NFC 功能
Qt NFC 提供了两种读写数据的选项。这些选项体现在AccessMethod 枚举中。
- NdefAccess - 通过readNdefMessages() 和writeNdefMessages() 使用 NDEF 消息。
- TagTypeSpecificAccess - 使用sendCommand() 发送自定义命令,并通过requestResponse() 获取结果。
TagTypeSpecificAccess 这意味着用户可能需要根据 NFC 标签类型发送不同的数据。Qt NFC 识别的标签类型在Type 枚举中进行了定义。
Qt NFC 对不同访问方式和标签类型的支持因平台而异。下表列出了当前各平台支持的功能子集。
| 平台 | 可识别的标签类型 | NDEF 支持 | 标签特定访问 |
|---|---|---|---|
| Android | 均来自Type 枚举 | 是 | 是 |
| iOS | 否 | 是——针对受支持的标签类型 | |
| Linux、Windows、macOS (通过PC/SC 实现) | 是——适用于NfcTagType4 | 是——适用于ProprietaryTag |
© 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.