QPaintedTextureImage Class

class Qt3DRender::QPaintedTextureImage

A QAbstractTextureImage that can be written through a QPainter. More...

Header: #include <QPaintedTextureImage>
qmake: QT += 3drender
Since: Qt 5.8
Inherits: Qt3DRender::QAbstractTextureImage

This class was introduced in Qt 5.8.

Properties

Public Functions

int height() const
QSize size() const
int width() const

Public Slots

void setHeight(int h)
void setSize(QSize size)
void setWidth(int w)

Signals

void heightChanged(int w)
void sizeChanged(QSize size)
void widthChanged(int w)

Detailed Description

A QPaintedTextureImage provides a way to specify a texture image (and thus an OpenGL texture) through a QPainter. The width and height of the texture image can be specified through the width and height or size properties.

A QPaintedTextureImage must be subclassed and the virtual paint() function implemented. Each time update() is called on the QPaintedTextureImage, the paint() function is invoked and the resulting image is uploaded.

The QPaintedTextureImage must be attached to some QAbstractTexture.

Property Documentation

height : int

This property holds the height of the texture image. The height must be greater than or equal to 1.

Access functions:

int height() const
void setHeight(int h)

Notifier signal:

void heightChanged(int w)

size : QSize

This property holds the size of the texture image.

Access functions:

QSize size() const
void setSize(QSize size)

Notifier signal:

void sizeChanged(QSize size)

See also height and width.

width : int

This property holds the width of the texture image. The width must be greater than or equal to 1.

Access functions:

int width() const
void setWidth(int w)

Notifier signal:

void widthChanged(int w)