QVideoWidget#
The QVideoWidget class provides a widget which presents video produced by a media object. More…
Synopsis#
Properties#
aspectRatioMode- How video is scaled with respect to its aspect ratiofullScreen- Whether video display is confined to a window or is fullScreen
Functions#
def
aspectRatioMode()def
videoSink()
Slots#
def
setAspectRatioMode(mode)def
setFullScreen(fullScreen)
Signals#
def
aspectRatioModeChanged(mode)def
fullScreenChanged(fullScreen)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
Warning
This section contains snippets that were automatically translated from C++ to Python and may contain errors.
Attaching a QVideoWidget to a QMediaPlayer or QCamera allows it to display the video or image output of that object.
player = QMediaPlayer() player.setSource(QUrl("http://example.com/myclip1.mp4")) videoWidget = 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
QCameraQMediaPlayerQGraphicsVideoItem
- class PySide6.QtMultimediaWidgets.QVideoWidget([parent=None])#
- Parameters:
parent –
PySide6.QtWidgets.QWidget
Constructs a new video widget.
The parent is passed to QWidget .
Note
Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.
- property PᅟySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioMode: AspectRatioMode#
This property holds how video is scaled with respect to its aspect ratio..
- Access functions:
setAspectRatioMode(mode)Signal
aspectRatioModeChanged(mode)
- property PᅟySide6.QtMultimediaWidgets.QVideoWidget.fullScreen: bool#
This property holds whether video display is confined to a window or is fullScreen..
- Access functions:
setFullScreen(fullScreen)Signal
fullScreenChanged(fullScreen)
- PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioMode()#
- Return type:
See also
Getter of property aspectRatioMode .
- PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioModeChanged(mode)#
- Parameters:
mode –
AspectRatioMode
Notification signal of property aspectRatioMode .
- PySide6.QtMultimediaWidgets.QVideoWidget.fullScreenChanged(fullScreen)#
- Parameters:
fullScreen – bool
Notification signal of property fullScreen .
- PySide6.QtMultimediaWidgets.QVideoWidget.setAspectRatioMode(mode)#
- Parameters:
mode –
AspectRatioMode
See also
Setter of property aspectRatioMode .
- PySide6.QtMultimediaWidgets.QVideoWidget.setFullScreen(fullScreen)#
- Parameters:
fullScreen – bool
See also
isFullScreen()
Setter of property fullScreen .
- PySide6.QtMultimediaWidgets.QVideoWidget.videoSink()#
- Return type:
Returns the QVideoSink instance.