QVideoWidget

PyQt5.QtMultimediaWidgets.QVideoWidget

Inherits from QWidget, QMediaBindableInterface.

Inherited by QCameraViewfinder.

Description

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

Attaching a QVideoWidget to a QMediaObject allows it to display the video or image output of that media object. A QVideoWidget is attached to media object by passing a pointer to the QMediaObject in its constructor, and detached by destroying the QVideoWidget.

#     player = new QMediaPlayer;

#     playlist = new QMediaPlaylist(player);
#     playlist->addMedia(QUrl("http://example.com/myclip1.mp4"));
#     playlist->addMedia(QUrl("http://example.com/myclip2.mp4"));

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

#     videoWidget->show();
#     playlist->setCurrentIndex(1);
#     player->play();

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

Methods

__init__(parent: QWidget = None)

Constructs a new video widget.

The parent is passed to QWidget.


aspectRatioMode() → AspectRatioMode

brightness() → int

See also

setBrightness().


contrast() → int

See also

setContrast().


event(QEvent) → bool

Current event event. Returns the value of the baseclass event()(QEvent *event) function.


hideEvent(QHideEvent)

TODO


hue() → int

See also

setHue().


mediaObject() → QMediaObject

TODO


moveEvent(QMoveEvent)

TODO


paintEvent(QPaintEvent)

TODO


resizeEvent(QResizeEvent)

TODO


saturation() → int

See also

setSaturation().


setAspectRatioMode(AspectRatioMode)

See also

aspectRatioMode().


setBrightness(int)

See also

brightness().


setContrast(int)

See also

contrast().


setFullScreen(bool)

See also

isFullScreen().


setHue(int)

See also

hue().


setMediaObject(QMediaObject) → bool

See also

mediaObject().


setSaturation(int)

See also

saturation().


showEvent(QShowEvent)

TODO


sizeHint() → QSize

Returns the size hint for the current back end, if there is one, or else the size hint from QWidget.

Signals

brightnessChanged(int)

TODO


contrastChanged(int)

TODO


fullScreenChanged(bool)

TODO


hueChanged(int)

TODO


saturationChanged(int)

TODO