QQuickAsyncImageProvider Class
La classe QQuickAsyncImageProvider fornisce un'interfaccia per il controllo asincrono delle richieste di immagini in QML. Per saperne di più...
| Intestazione: | #include <QQuickAsyncImageProvider> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| Eredita da: | QQuickImageProvider |
Funzioni pubbliche
| virtual QQuickImageResponse * | requestImageResponse(const QString &id, const QSize &requestedSize) = 0 |
Descrizione dettagliata
Per un'implementazione completa, consultare l'esempio Image Response Provider.
Vedere anche QQuickImageProvider.
Documentazione sulle funzioni membro
[pure virtual] QQuickImageResponse *QQuickAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
Implementare questo metodo per restituire il job che fornirà la texture con id.
L'id è la fonte dell'immagine richiesta, da cui sono stati rimossi lo schema "image:" e l'identificatore del provider. Ad esempio, se l'immagine source fosse "image://myprovider/icons/home", l'id specificato sarebbe "icons/home".
L’ requestedSize corrisponde all’ Image::sourceSize richiesta da un elemento Image. Se requestedSize è una dimensione valida, l’immagine restituita dovrebbe avere quella dimensione.
Nota: questo metodo può essere chiamato da più thread, pertanto è necessario assicurarsi che l'implementazione di questo metodo sia rientrante.
© 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.