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.
See also
Methods¶
- aspectRatioMode() → AspectRatioMode
See also
- brightness() → int
See also
- contrast() → int
See also
- event(QEvent) → bool
Current event event. Returns the value of the baseclass event()(QEvent *event) function.
- hideEvent(QHideEvent)
TODO
- hue() → int
See also
- mediaObject() → QMediaObject
TODO
- moveEvent(QMoveEvent)
TODO
- paintEvent(QPaintEvent)
TODO
- resizeEvent(QResizeEvent)
TODO
- saturation() → int
See also
- setAspectRatioMode(AspectRatioMode)
See also
- setBrightness(int)
See also
- setContrast(int)
See also
- setFullScreen(bool)
See also
isFullScreen().
- setHue(int)
See also
- setMediaObject(QMediaObject) → bool
See also
- setSaturation(int)
See also
- showEvent(QShowEvent)
TODO
Signals¶
- brightnessChanged(int)
TODO
- contrastChanged(int)
TODO
- fullScreenChanged(bool)
TODO
- hueChanged(int)
TODO
- saturationChanged(int)
TODO