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()

当已注册的后端发生变化时,将调用此函数。任何依赖于其他传感器存在的后端都应在此注册或取消注册。

另请参阅 创建传感器插件

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