ImageProvider
Module | Quick |
---|---|
Include |
|
CMake |
|
QMake |
|
Coroutines based implementation of QQuickImaqeProvider
.
To use QCoro::ImageProvider
, you need to create a subclass of it, and implement the asyncRequestImage
function, as shown in the example below:
#include <QCoro/QCoroImageProvider>
class IconImageProvider : public QCoro::ImageProvider
{
public:
QCoro::Task<QImage> asyncRequestImage(const QString &id, const QSize &) override;
};
The subclass can be registered with a QQmlEngine
like any QQuickImageProvider
subclass.