PC/SC 支持Qt NFC

在 macOS 和 Windows 上,PC/SC 支持使用本地 API,在其他平台上则使用PCSCLite库。API 可用于访问有线和无线智能卡和存储卡。

局限性

  • 当前的 API 无法区分不同的读卡器/插槽。
  • NDEF 访问仅适用于 NFC 类型 4 标签。
  • 在卡上开始交易的其他应用程序可能会阻止 Qt 应用程序使用 Qt NFC API。
  • QNearFieldTarget::sendCommand与 PC/SC 目标一起使用的 () 会启动一个事务,该事务在调用QNearFieldTarget::disconnect() 之前一直处于活动状态。该事务会阻止其他应用程序访问该目标。
  • 后端正在轮询新标签,这意味着在报告新标签之前可能会有一个长达整个轮询间隔的延迟。默认轮询间隔为 100 毫秒。可以通过将环境参数QT_NFC_POLL_INTERVAL_MS 设置为以毫秒为单位的整数值来调整。

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