QVideoWidget¶
The QVideoWidget
class provides a widget which presents video produced by a media object. More…
Synopsis¶
Functions¶
def
aspectRatioMode
()def
videoSink
()
Slots¶
def
setAspectRatioMode
(mode)def
setFullScreen
(fullScreen)
Signals¶
def
aspectRatioModeChanged
(mode)def
fullScreenChanged
(fullScreen)
Detailed Description¶
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
QCamera
QMediaPlayer
QGraphicsVideoItem
- class PySide6.QtMultimediaWidgets.QVideoWidget([parent=None])¶
- Parameters
parent –
PySide6.QtWidgets.QWidget
Constructs a new video widget.
The parent
is passed to QWidget
.
- PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioMode()¶
- Return type
This property holds how video is scaled with respect to its aspect ratio..
- PySide6.QtMultimediaWidgets.QVideoWidget.aspectRatioModeChanged(mode)¶
- Parameters
mode –
AspectRatioMode
- PySide6.QtMultimediaWidgets.QVideoWidget.fullScreenChanged(fullScreen)¶
- Parameters
fullScreen – bool
- PySide6.QtMultimediaWidgets.QVideoWidget.setAspectRatioMode(mode)¶
- Parameters
mode –
AspectRatioMode
This property holds how video is scaled with respect to its aspect ratio..
- PySide6.QtMultimediaWidgets.QVideoWidget.setFullScreen(fullScreen)¶
- Parameters
fullScreen – bool
This property holds whether video display is confined to a window or is ..
- PySide6.QtMultimediaWidgets.QVideoWidget.videoSink()¶
- Return type
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.