Qt3DRender.QPaintedTextureImage

A QAbstractTextureImage that can be written through a QPainter . More

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage

Synopsis

Functions

Virtual functions

Slots

Signals

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 .

class PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage([parent=None])
Parameters

parentQNode

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.height()
Return type

int

See also

setHeight()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.heightChanged(w)
Parameters

wint

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.paint(painter)
Parameters

painterQPainter

Paints the texture image with the specified QPainter object painter .

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.setHeight(h)
Parameters

hint

Sets the height (h ) of the texture image. Triggers an update, if the size changes.

See also

height()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.setSize(size)
Parameters

sizeQSize

Sets the width and height of the texture image. Triggers an update, if the size changes.

See also

size()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.setWidth(w)
Parameters

wint

Sets the width (w ) of the texture image. Triggers an update, if the size changes.

See also

width()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.size()
Return type

QSize

See also

setSize()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.sizeChanged(size)
Parameters

sizeQSize

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.update([rect=QRect()])
Parameters

rectQRect

Schedules the painted texture’s paint() function to be called, which in turn uploads the new image to the GPU. Parameter rect is currently unused.

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.width()
Return type

int

See also

setWidth()

PySide2.Qt3DRender.Qt3DRender.QPaintedTextureImage.widthChanged(w)
Parameters

wint