IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QQmlImageProviderBase Class

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

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QQmlImageProviderBase Class

  • Header: QQmlImageProviderBase

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Qml)

    target_link_libraries(mytarget PRIVATE Qt6::Qml)

  • qmake: QT += qml

  • Inherits: QObject

  • Inherited By: QQuickImageProvider

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

Member Type Documentation

 

enum QQmlImageProviderBase::Flag

flags QQmlImageProviderBase::Flags

Defines specific requirements or features of this image provider.

Constant

Value

Description

QQmlImageProviderBase::ForceAsynchronousImageLoading

0x01

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.

The Flags type is a typedef for QFlags<Flag>. It stores an OR combination of Flag values.

enum QQmlImageProviderBase::ImageType

Defines the type of image supported by this image provider.

Constant

Value

Description

QQmlImageProviderBase::Image

1

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

QQmlImageProviderBase::Pixmap

2

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

QQmlImageProviderBase::Texture

3

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

QQmlImageProviderBase::ImageResponse

4

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

Member Function Documentation

 

[pure virtual] QQmlImageProviderBase::Flags QQmlImageProviderBase::flags() const

Implement this to return the properties of this image provider.

[pure virtual] QQmlImageProviderBase::ImageType QQmlImageProviderBase::imageType() const

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

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+