QQmlImageProviderBase#

The QQmlImageProviderBase class is used to register image providers in the QML engine. More

Inheritance diagram of PySide6.QtQml.QQmlImageProviderBase

Inherited by: QQuickImageProvider, QQuickAsyncImageProvider

Synopsis#

Virtual functions#

Note

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

Detailed Description#

Image providers must be registered with the QML engine. The only information the QML engine knows about image providers is the type of image data they provide. To use an image provider to acquire image data, you must cast the QQmlImageProviderBase pointer to a QQuickImageProvider pointer.

See also

QQuickImageProviderQQuickTextureFactory

class PySide6.QtQml.QQmlImageProviderBase#
PySide6.QtQml.QQmlImageProviderBase.ImageType#

Defines the type of image supported by this image provider.

Constant

Description

QQmlImageProviderBase.Image

The Image Provider provides QImage images. The QQuickImageProvider::requestImage() method will be called for all image requests.

QQmlImageProviderBase.Pixmap

The Image Provider provides QPixmap images. The QQuickImageProvider::requestPixmap() method will be called for all image requests.

QQmlImageProviderBase.Texture

The Image Provider provides QSGTextureProvider based images. The QQuickImageProvider::requestTexture() method will be called for all image requests.

QQmlImageProviderBase.ImageResponse

The Image provider provides QQuickTextureFactory based images. Should only be used in QQuickAsyncImageProvider or its subclasses. The QQuickAsyncImageProvider::requestImageResponse() method will be called for all image requests. Since Qt 5.6

PySide6.QtQml.QQmlImageProviderBase.Flag#

(inherits enum.Flag) Defines specific requirements or features of this image provider.

Constant

Description

QQmlImageProviderBase.ForceAsynchronousImageLoading

Ensures that image requests to the provider are run in a separate thread, which allows the provider to spend as much time as needed on producing the image without blocking the main thread.

abstract PySide6.QtQml.QQmlImageProviderBase.flags()#
Return type:

Combination of QQmlImageProviderBase.Flag

Implement this to return the properties of this image provider.

abstract PySide6.QtQml.QQmlImageProviderBase.imageType()#
Return type:

ImageType

Implement this method to return the image type supported by this image provider.