This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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.
- class PySide6.QtQuick.QQuickImageResponse#
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.
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.
- Return type:
Returns the error string for the job execution. An empty string means no error.
Signals that the job execution has finished (be it successfully, because an error happened or because it was cancelled).
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.
- abstract PySide6.QtQuick.QQuickImageResponse.textureFactory()#
- Return type:
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.