QQuickAsyncImageProvider Class | Qt Quick | Qt 6.11.1
Description: The QQuickAsyncImageProvider class provides an interface for asynchronous control of QML image requests.

- Qt 6.11
- Qt Quick
- C++ Classes
- QQuickAsyncImageProvider
- Qt 6.11.1 Reference Documentation

# QQuickAsyncImageProvider Class

The QQuickAsyncImageProvider class provides an interface for asynchronous control of QML image requests. More...

Header: | `#include <QQuickAsyncImageProvider>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Quick)` `target_link_libraries(mytarget PRIVATE Qt6::Quick)`
qmake: | `QT += quick`
Inherits: | QQuickImageProvider

- List of all members, including inherited members

## Public Functions

virtual QQuickImageResponse * | requestImageResponse(const QString &id, const QSize &requestedSize) = 0

## Detailed Description

See the Image Response Provider Example for a complete implementation.

See also QQuickImageProvider.

## Member Function Documentation

### `[pure virtual]` QQuickImageResponse *QQuickAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)

Implement this method to return the job that will provide the texture with id.

The id is the requested image source, with the "image:" scheme and provider identifier removed. For example, if the image source was "image://myprovider/icons/home", the given id would be "icons/home".

The requestedSize corresponds to the Image::sourceSize requested by an Image item. If requestedSize is a valid size, the image returned should be of that size.

Note: this method may be called by multiple threads, so ensure the implementation of this method is reentrant.