QSensorPluginInterface Class
QSensorPluginInterface 类是传感器插件的纯虚拟接口。更多
Header: | #include <QSensorPluginInterface> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
公共函数
virtual void | registerSensors() = 0 |
详细说明
QSensorPluginInterface 类在传感器插件中实现,用于向QSensorManager 注册传感器后端。
另请参阅 创建传感器插件。
成员函数文档
[pure virtual]
void QSensorPluginInterface::registerSensors()
该函数在插件加载时调用。插件应通过调用QSensorManager::registerBackend() 来注册传感器后端。任何利用其他传感器的后端都应在 QSensorPluginInterface::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.