En esta página

QPressureSensor Class

La clase `QPressureSensor` es una envoltura de uso sencillo que envuelve a ` QSensor`. Más información...

Encabezado: #include <QPressureSensor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
Heredan: QSensor

Funciones públicas

QPressureSensor(QObject *parent = nullptr)
virtual ~QPressureSensor()
QPressureReading *reading() const

Descripción detallada

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

Esta clase también cuenta con una función « reading()» que devuelve un « QPressureReading » en lugar de un « QSensorReading ».

Para obtener más información sobre el funcionamiento del sensor, consulta QPressureReading.

Véase también QPressureReading.

Documentación de las funciones de miembro

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

Crea el sensor como un elemento secundario de parent.

[virtual noexcept] QPressureSensor::~QPressureSensor()

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

QPressureReading *QPressureSensor::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.