PySide6.QtSensors.QSensorManager¶
- class QSensorManager¶
- The - QSensorManagerclass handles registration and creation of sensor backends.- Details- Sensor plugins register backends using the - registerBackend()function.- When - connectToBackend()is called, the- createBackend()function will be called.- Synopsis¶- Static functions¶- def - createBackend()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Create a backend for - sensor. Returns null if no suitable backend exists.- static isBackendRegistered(type, identifier)¶
- Parameters:
- type – - QByteArray
- identifier – - QByteArray
 
- Return type:
- bool 
 
 - Returns true if the backend identified by - typeand- identifieris registered.- This is a convenience method that helps out plugins doing dynamic registration. - static registerBackend(type, identifier, factory)¶
- Parameters:
- type – - QByteArray
- identifier – - QByteArray
- factory – - QSensorBackendFactory
 
 
 - Register a sensor for - type. The- identifiermust be unique.- The - factorywill be asked to create instances of the backend.- Sensor identifiers starting with - genericor- dummyare given lower priority when choosing the default sensor if other sensors are found.- static setDefaultBackend(type, identifier)¶
- Parameters:
- type – - QByteArray
- identifier – - QByteArray
 
 
 - Sets or overwrite the sensor - typewith the backend- identifier.- static unregisterBackend(type, identifier)¶
- Parameters:
- type – - QByteArray
- identifier – - QByteArray
 
 
 - Unregister the backend for - typewith- identifier.- Note that this only prevents new instance of the backend from being created. It does not invalidate the existing instances of the backend. The backend code should handle the disappearance of the underlying hardware itself.