内容表

上一话题

QQmlFileSelector

下一话题

QQmlIncubationController

QQmlImageProviderBase

QQmlImageProviderBase class is used to register image providers in the QML engine. 更多

Inheritance diagram of PySide2.QtQml.QQmlImageProviderBase

继承者: QQuickAsyncImageProvider , QQuickImageProvider

详细描述

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 指针。

PySide2.QtQml.QQmlImageProviderBase. ImageType

Defines the type of image supported by this image provider.

常量

描述

QQmlImageProviderBase.Image

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

QQmlImageProviderBase.Pixmap

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

QQmlImageProviderBase.Texture

The Image Provider provides QSGTextureProvider based images. The 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 requestImageResponse() method will be called for all image requests. Since Qt 5.6

PySide2.QtQml.QQmlImageProviderBase. Flag

Defines specific requirements or features of this image provider.

常量

描述

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.

PySide2.QtQml.QQmlImageProviderBase. flags ( )
返回类型

标志

Implement this to return the properties of this image provider.

PySide2.QtQml.QQmlImageProviderBase. imageType ( )
返回类型

ImageType

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