このページでは

QQuickAsyncImageProvider Class

QQuickAsyncImageProvider クラスは、QML の画像リクエストを非同期で制御するためのインターフェースを提供します。詳細...

ヘッダー: #include <QQuickAsyncImageProvider>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
継承元: QQuickImageProvider

パブリック関数

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

詳細な説明

完全な実装については、「Image Response Provider」の例を参照してください。

「QQuickImageProvider」も参照してください 。

メンバー関数のドキュメント

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

このメソッドを実装して、id を持つテクスチャを提供するジョブを返してください。

id は、要求された画像ソースから「image:」スキームとプロバイダ識別子が削除されたものです。たとえば、画像source が「image://myprovider/icons/home」であった場合、指定されるid は「icons/home」となります。

requestedSize は、ImageアイテムによってリクエストされたImage::sourceSize に対応します。requestedSize が有効なサイズである場合、返される画像はそのサイズである必要があります。

注:この メソッドは複数のスレッドから呼び出される可能性があるため、このメソッドの実装が再入可能であることを確認してください。

© 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.