本页内容

QSensorChangesInterface Class

QSensorChangesInterface 类是面向传感器插件的纯虚拟接口。更多内容...

头文件: #include <QSensorChangesInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors

公共函数

virtual void sensorsChanged() = 0

详细说明

QSensorChangesInterface 类在传感器插件中实现,用于接收已注册传感器后端发生变化的通知。

另请参阅 “创建传感器插件”。

成员函数文档

[pure virtual] void QSensorChangesInterface::sensorsChanged()

当已注册的后端发生变化时,会调用此函数。任何依赖于其他传感器是否存在的后端,都应在此处进行注册或注销。

另请参阅 “创建传感器插件”。

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