QGraphicsVideoItem¶
The
QGraphicsVideoItem
class provides a graphics item which display video produced by aQMediaObject
. More…
Synopsis¶
Functions¶
def
aspectRatioMode
()def
nativeSize
()def
offset
()def
setAspectRatioMode
(mode)def
setOffset
(offset)def
setSize
(size)def
size
()
Signals¶
def
nativeSizeChanged
(size)
Detailed Description¶
Attaching a
QGraphicsVideoItem
to aQMediaObject
allows it to display the video or image output of that media object. AQGraphicsVideoItem
is attached to a media object by passing a pointer to theQMediaObject
to thesetMediaObject()
function.player = new QMediaPlayer(this); QGraphicsVideoItem *item = new QGraphicsVideoItem; player->setVideoOutput(item); graphicsView->scene()->addItem(item); graphicsView->show(); player->setMedia(QUrl("http://example.com/myclip4.ogv")); player->play();Note : Only a single display output can be attached to a media object at one time.
See also
-
class
QGraphicsVideoItem
([parent=None])¶ - param parent
QGraphicsItem
Constructs a graphics item that displays video.
The
parent
is passed toQGraphicsItem
.
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
aspectRatioMode
()¶ - Return type
AspectRatioMode
See also
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
nativeSize
()¶ - Return type
QSizeF
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
nativeSizeChanged
(size)¶ - Parameters
size –
QSizeF
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
offset
()¶ - Return type
QPointF
See also
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
setAspectRatioMode
(mode)¶ - Parameters
mode –
AspectRatioMode
See also
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
setOffset
(offset)¶ - Parameters
offset –
QPointF
See also
-
PySide2.QtMultimediaWidgets.QGraphicsVideoItem.
setSize
(size)¶ - Parameters
size –
QSizeF
See also
© 2018 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.