- Qt 6.8
- Qt GUI
- C++ Classes
- QtGuiPrivate
- QRhiReadbackResult
- Qt 6.8.1 Reference Documentation

# QRhiReadbackResult Struct

Describes the results of a potentially asynchronous buffer or texture readback operation. More...

Header: | `#include <rhi/qrhi.h>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Gui)` `target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)`
qmake: | `QT += gui-private`
Since: | Qt 6.6

- List of all members, including inherited members

## Public Variables

std::function<void ()> | completed
QByteArray | data
QRhiTexture::Format | format
QSize | pixelSize

## Detailed Description

When completed is set, the function is invoked when the data is available. format and pixelSize are set upon completion together with data.

Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.

## Member Variable Documentation

### std::function<void ()> QRhiReadbackResult::completed

Callback that is invoked upon completion, on the thread the QRhi operates on. Can be left set to `nullptr`, in which case no callback is invoked.

### QByteArray QRhiReadbackResult::data

The buffer or image data.

See also QRhiResourceUpdateBatch::readBackTexture() and QRhiResourceUpdateBatch::readBackBuffer().

### QRhiTexture::Format QRhiReadbackResult::format

Valid only for textures, the texture format.

### QSize QRhiReadbackResult::pixelSize

Valid only for textures, the size in pixels.