Nesta página

QProximitySensor Class

A classe QProximitySensor é um wrapper de conveniência para QSensor. Mais...

Cabeçalho: #include <QProximitySensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
Herdado de: QSensor

Funções públicas

QProximitySensor(QObject *parent = nullptr)
virtual ~QProximitySensor()
QProximityReading *reading() const

Descrição detalhada

A única diferença comportamental é que esta classe define o tipo corretamente.

Essa classe também possui uma função ` reading()` que retorna um ` QProximityReading ` em vez de um ` QSensorReading`.

Para obter detalhes sobre como o sensor funciona, consulte QProximityReading.

Consulte também QProximityReading.

Documentação da função de membro

[explicit] QProximitySensor::QProximitySensor(QObject *parent = nullptr)

Crie o sensor como um elemento filho d parent.

[virtual noexcept] QProximitySensor::~QProximitySensor()

Destrua o sensor. Desativa o sensor, caso ele ainda não tenha sido desativado.

QProximityReading *QProximitySensor::reading() const

Retorna a classe de leitura deste sensor.

Veja também QSensor::reading().

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