QProximityReading Class | Qt Sensors | Qt 6.11.1
Description: The QProximityReading class represents one reading from the proximity sensor.

- Qt 6.11
- Qt Sensors
- C++ Classes
- QProximityReading
- Qt 6.11.1 Reference Documentation

# QProximityReading Class

The QProximityReading class represents one reading from the proximity sensor. More...

Header: | `#include <QProximityReading>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Sensors)` `target_link_libraries(mytarget PRIVATE Qt6::Sensors)`
qmake: | `QT += sensors`
Inherits: | QSensorReading

- List of all members, including inherited members

## Properties

- close : bool

## Public Functions

bool | close() const
void | setClose(bool close)

## Detailed Description

The proximity sensor can only indicate if an object is close or not.

The distance at which an object is considered close is device-specific. This distance may be available in the QSensor::outputRanges property.

## Property Documentation

### `[read-only]` close : bool

This property holds a value indicating if something is close.

Set to true if something is close. Set to false is nothing is close.

Access functions:

bool | close() const

See also QProximityReading_Units.

## Member Function Documentation

### void QProximityReading::setClose(bool close)

Sets the close value to close.

See also close().