QGraphicsVideoItem

The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaPlayer or QCamera . More

Inheritance diagram of PySide6.QtMultimediaWidgets.QGraphicsVideoItem

Synopsis

Functions

Detailed Description

Attaching a QGraphicsVideoItem to a QMediaPlayer or QCamera allows it to display the video or image output of that media object.

player = new QMediaPlayer(this);

QGraphicsVideoItem *item = new QGraphicsVideoItem;
player->setVideoOutput(item);
graphicsView->scene()->addItem(item);
graphicsView->show();

player->setSource(QUrl("http://example.com/myclip4.ogv"));
player->play();

Note: Only a single display output can be attached to a media object at one time.

See also

QMediaPlayer QVideoWidget QCamera

class PySide6.QtMultimediaWidgets.QGraphicsVideoItem([parent=None])
Parameters

parentPySide6.QtWidgets.QGraphicsItem

Constructs a graphics item that displays video.

The parent is passed to QGraphicsItem .

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.aspectRatioMode()
Return type

AspectRatioMode

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.nativeSize()
Return type

PySide6.QtCore.QSizeF

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.nativeSizeChanged(size)
Parameters

sizePySide6.QtCore.QSizeF

Signals that the native size of the video has changed.

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.offset()
Return type

PySide6.QtCore.QPointF

See also

setOffset()

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.setAspectRatioMode(mode)
Parameters

modeAspectRatioMode

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.setOffset(offset)
Parameters

offsetPySide6.QtCore.QPointF

See also

offset()

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.setSize(size)
Parameters

sizePySide6.QtCore.QSizeF

See also

size()

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.size()
Return type

PySide6.QtCore.QSizeF

See also

setSize()

PySide6.QtMultimediaWidgets.QGraphicsVideoItem.videoSink()
Return type

PySide6.QtMultimedia.QVideoSink