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 |
詳しい説明
完全な実装については、画像レスポンスプロバイダの例を参照してください。
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::sourceSize に対応する。requestedSize が有効なサイズであれば、返される画像はそのサイズでなければならない。
注意: このメソッドは複数のスレッドから呼び出される可能性があるので、このメソッドの実装がリエントラントであることを確認してください。
© 2025 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.