QQuickAsyncImageProvider Class
A classe QQuickAsyncImageProvider oferece uma interface para o controle assíncrono de solicitações de imagens no QML. Mais...
| Cabeçalho: | #include <QQuickAsyncImageProvider> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| Herdado de: | QQuickImageProvider |
Funções públicas
| virtual QQuickImageResponse * | requestImageResponse(const QString &id, const QSize &requestedSize) = 0 |
Descrição detalhada
Consulte o Exemplo de Provedor de Resposta de Imagem para obter uma implementação completa.
Consulte também QQuickImageProvider.
Documentação da função de membro
[pure virtual] QQuickImageResponse *QQuickAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
Implemente este método para retornar a tarefa que fornecerá a textura com id.
O id é a fonte da imagem solicitada, com o esquema “image:” e o identificador do provedor removidos. Por exemplo, se a imagem source fosse “image://myprovider/icons/home”, o id fornecido seria “icons/home”.
O requestedSize corresponde ao Image::sourceSize solicitado por um item Image. Se requestedSize for um tamanho válido, a imagem retornada deverá ter esse tamanho.
Observação: este método pode ser chamado por várias threads; portanto, certifique-se de que a implementação deste método seja reentrante.
© 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.