En esta página

QAmbientTemperatureSensor Class

La clase QAmbientTemperatureSensor es una envoltura de conveniencia alrededor de QSensor. Más...

Cabecera: #include <QAmbientTemperatureSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
Hereda: QSensor

Funciones Públicas

QAmbientTemperatureSensor(QObject *parent = nullptr)
virtual ~QAmbientTemperatureSensor()
QAmbientTemperatureReading *reading() const

Descripción detallada

La única diferencia de comportamiento es que esta clase establece el tipo correctamente.

Esta clase también presenta una función reading() que devuelve un QAmbientTemperatureReading en lugar de un QSensorReading.

Para más detalles sobre el funcionamiento del sensor, véase QAmbientTemperatureReading.

Véase también QAmbientTemperatureReading.

Documentación de funciones miembro

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

Construye el sensor como hijo de parent.

[virtual noexcept] QAmbientTemperatureSensor::~QAmbientTemperatureSensor()

Destruye el sensor. Detiene el sensor si aún no se ha detenido.

QAmbientTemperatureReading *QAmbientTemperatureSensor::reading() const

Devuelve la clase de lectura de este sensor.

Véase también 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.