内容表

上一话题

QGraphicsVideoItem

下一话题

QVideoWidgetControl

QVideoWidget

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

Inheritance diagram of PySide2.QtMultimediaWidgets.QVideoWidget

继承者: QCameraViewfinder

概要

信号

详细描述

Attaching a QVideoWidget 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();
											

注意 :每次只可以把单个显示输出附加到媒体对象。

class QVideoWidget ( [ parent=None ] )
param parent

QWidget

构造新视频小部件。

parent 会被传递给 QWidget .

PySide2.QtMultimediaWidgets.QVideoWidget. aspectRatioMode ( )
返回类型

AspectRatioMode

PySide2.QtMultimediaWidgets.QVideoWidget. brightness ( )
返回类型

int

另请参阅

setBrightness()

PySide2.QtMultimediaWidgets.QVideoWidget. brightnessChanged ( brightness )
参数

brightness int

PySide2.QtMultimediaWidgets.QVideoWidget. contrast ( )
返回类型

int

另请参阅

setContrast()

PySide2.QtMultimediaWidgets.QVideoWidget. contrastChanged ( contrast )
参数

contrast int

PySide2.QtMultimediaWidgets.QVideoWidget. fullScreenChanged ( fullScreen )
参数

fullScreen bool

PySide2.QtMultimediaWidgets.QVideoWidget. hue ( )
返回类型

int

另请参阅

setHue()

PySide2.QtMultimediaWidgets.QVideoWidget. hueChanged ( hue )
参数

hue int

PySide2.QtMultimediaWidgets.QVideoWidget. saturation ( )
返回类型

int

另请参阅

setSaturation()

PySide2.QtMultimediaWidgets.QVideoWidget. saturationChanged ( saturation )
参数

saturation int

PySide2.QtMultimediaWidgets.QVideoWidget. setAspectRatioMode ( mode )
参数

mode AspectRatioMode

另请参阅

aspectRatioMode()

PySide2.QtMultimediaWidgets.QVideoWidget. setBrightness ( brightness )
参数

brightness int

另请参阅

brightness()

PySide2.QtMultimediaWidgets.QVideoWidget. setContrast ( contrast )
参数

contrast int

另请参阅

contrast()

PySide2.QtMultimediaWidgets.QVideoWidget. setFullScreen ( fullScreen )
参数

fullScreen bool

另请参阅

isFullScreen()

PySide2.QtMultimediaWidgets.QVideoWidget. setHue ( hue )
参数

hue int

另请参阅

hue()

PySide2.QtMultimediaWidgets.QVideoWidget. setSaturation ( saturation )
参数

saturation int

另请参阅

saturation()

PySide2.QtMultimediaWidgets.QVideoWidget. videoSurface ( )
返回类型

QAbstractVideoSurface