QVideoWidget

The QVideoWidget class provides a widget which presents video produced by a media object. More

Inheritance diagram of PySide6.QtMultimediaWidgets.QVideoWidget

Synopsis

Functions

Detailed Description

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

player = new QMediaPlayer;
player->setSource(QUrl("http://example.com/myclip1.mp4"));

videoWidget = new QVideoWidget;
player->setVideoOutput(videoWidget);

videoWidget->show();
player->play();

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

See also

QCamera QMediaPlayer QGraphicsVideoItem

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

parentPySide6.QtWidgets.QWidget

Constructs a new video widget.

The parent is passed to QWidget .

PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioMode()
Return type

AspectRatioMode

PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioModeChanged(mode)
Parameters

modeAspectRatioMode

PySide6.QtMultimediaWidgets.QVideoWidget.fullScreenChanged(fullScreen)
Parameters

fullScreen – bool

Signals that the fullScreen mode of a video widget has changed.

See also

isFullScreen()

PySide6.QtMultimediaWidgets.QVideoWidget.setAspectRatioMode(mode)
Parameters

modeAspectRatioMode

PySide6.QtMultimediaWidgets.QVideoWidget.setFullScreen(fullScreen)
Parameters

fullScreen – bool

See also

isFullScreen()

PySide6.QtMultimediaWidgets.QVideoWidget.videoSink()
Return type

PySide6.QtMultimedia.QVideoSink