QQuickAsyncImageProvider Class
The QQuickAsyncImageProvider class provides an interface for for asynchronous control of QML image requests. 更多...
头文件: | #include <QQuickAsyncImageProvider> |
qmake: | QT += quick |
开始支持版本: | Qt 5.6 |
基类: | QQuickImageProvider |
公有函数
QQuickAsyncImageProvider() | |
virtual | ~QQuickAsyncImageProvider() |
virtual QQuickImageResponse * | requestImageResponse(const QString &id, const QSize &requestedSize) = 0 |
- 5 个公有函数继承自 QQuickImageProvider
- 2 个公有函数继承自 QQmlImageProviderBase
详细描述
The QQuickAsyncImageProvider class provides an interface for for asynchronous control of QML image requests.
See the Image Response Provider Example for a complete implementation.
成员函数
QQuickAsyncImageProvider::QQuickAsyncImageProvider()
Default constructs an instance of QQuickAsyncImageProvider.
[virtual]
QQuickAsyncImageProvider::~QQuickAsyncImageProvider()
Destroys the instance of QQuickAsyncImageProvider. The destructor is virtual.
[pure virtual]
QQuickImageResponse *QQuickAsyncImageProvider::requestImageResponse(const QString &id, const QSize &requestedSize)
Implement this method to return the job that will provide the texture with id.
The id is the requested image source, with the "image:" scheme and provider identifier removed. For example, if the image source was "image://myprovider/icons/home", the given id would be "icons/home".
The requestedSize corresponds to the Image::sourceSize requested by an Image item. If requestedSize is a valid size, the image returned should be of that size.
Note: this method may be called by multiple threads, so ensure the implementation of this method is reentrant.