|qmake:||QT += quick|
This class was introduced in Qt 5.6.
|virtual QString||errorString() const|
|virtual QQuickTextureFactory *||textureFactory() const = 0|
The purpose of an image response is to provide a way for image provider jobs to be executed in an asynchronous way.
See the Image Response Provider Example for a complete implementation.
See also QQuickImageProvider.
Member Function Documentation
Constructs the image response
This method is used to communicate that the response is no longer required by the engine.
It may be reimplemented to cancel a request in the provider side, however, it is not mandatory.
Note: finished() should not be emitted until the response is complete, regardless of whether or not cancel() was called. If it is called prematurely, the engine may destroy the response while it is still active, leading to a crash.
Signals that the job execution has finished (be it successfully, because an error happened or because it was cancelled).
Note: Emission of this signal must be the final action the response performs: once the signal is received, the response will subsequently be destroyed by the engine.
Destructs the image response
[virtual] QString QQuickImageResponse::errorString() const
Returns the error string for the job execution. An empty string means no error.
[pure virtual] QQuickTextureFactory *QQuickImageResponse::textureFactory() const
Note: This method will be called only when needed. For example, it may not be called if there is an error or the job is cancelled. Therefore, allocate the QQuickTextureFactory instance only in this method or otherwise ensure its deletion.
© 2023 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.