本页内容

Qt Sensors 后端

Qt Sensors 后端将Qt Sensors API与平台服务或硬件传感器连接起来。

概述

QSensor 实例与后端对象进行通信。后端通常随特定设备的Qt Sensors 库一起提供,但也可以使用第三方后端。 后端可以直接与硬件通信,也可以与系统服务通信。在某些情况下,它甚至可以与另一个传感器通信。例如,方位传感器后端会与加速度计通信以确定设备的方位。

后端类

如果您希望通过 Sensors API 提供传感器,请使用以下类。

QSensorBackend

传感器实现

QSensorBackendFactory

实例化 QSensorBackend 的实例

QSensorChangesInterface

传感器插件的纯虚拟接口

QSensorManager

处理传感器后端的注册和创建

QSensorPluginInterface

传感器插件的纯虚拟接口

后端主题

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