QSensorPluginInterface Class

The QSensorPluginInterface class is the pure virtual interface to sensor plugins. 更多...

頭: #include <QSensorPluginInterface>
qmake: QT += sensors
Since: Qt 5.1

該類在 Qt 5.1 引入。

公共函數

virtual void registerSensors () = 0

詳細描述

The QSensorPluginInterface class is implemented in sensor plugins to register sensor backends with QSensorManager .

另請參閱 Creating a sensor plugin .

成員函數文檔編製

[pure virtual] void QSensorPluginInterface:: registerSensors ()

This function is called when the plugin is loaded. The plugin should register sensor backends by calling QSensorManager::registerBackend (). Any backends that utilise other sensors should be registered in the QSensorPluginInterface::sensorsChanged() method instead.

另請參閱 Creating a sensor plugin .