QGraphicsVideoItem Class The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject. More...  
 Header:
 #include <QGraphicsVideoItem> 


 qmake:
 QT += multimediawidgets


 Inherits:
 QGraphicsObject and QMediaBindableInterface



 List of all members, including inherited members  Properties  
 
aspectRatioMode : Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode 
mediaObject : QMediaObject * const 
nativeSize : const QSizeF 

 
offset : QPointF 
size : QSizeF  
   12 properties inherited from QGraphicsObject
 1 property inherited from QObject
  Public Functions  
 

QGraphicsVideoItem(QGraphicsItem *parent = Q_NULLPTR)
 
 

~QGraphicsVideoItem()
 
 Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode 

aspectRatioMode() const
 
 QSizeF 

nativeSize() const
 
 QPointF 

offset() const
 
 void 

setAspectRatioMode(Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode mode)
 
 void 

setOffset(const QPointF &offset)
 
 void 

setSize(const QSizeF &size)
 
 QSizeF 

size() const
  Reimplemented Public Functions  
 virtual QRectF 

boundingRect() const override
 
 virtual QMediaObject *

mediaObject() const override
 
 virtual void 

paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) override
   2 public functions inherited from QGraphicsObject
 1 public function inherited from QMediaBindableInterface
 32 public functions inherited from QObject
 176 public functions inherited from QGraphicsItem
  Signals  
 void 

nativeSizeChanged(const QSizeF &size)
   9 signals inherited from QGraphicsObject
 2 signals inherited from QObject
  Additional Inherited Members  1 public slot inherited from QObject
 11 static public members inherited from QObject
 2 static public members inherited from QGraphicsItem
 1 protected function inherited from QGraphicsObject
 1 protected function inherited from QMediaBindableInterface
 9 protected functions inherited from QObject
 24 protected functions inherited from QGraphicsItem
 1 protected slot inherited from QGraphicsObject
  Detailed Description The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject. Attaching a QGraphicsVideoItem to a QMediaObject allows it to display the video or image output of that media object. A QGraphicsVideoItem is attached to a media object by passing a pointer to the QMediaObject to the setMediaObject() 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 QMediaObject, QMediaPlayer, and QVideoWidget.  Property Documentation 
aspectRatioMode : Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode
 how a video is scaled to fit the graphics item's size. Access functions:  
 Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode 

aspectRatioMode() const
 
 void 

setAspectRatioMode(Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069spectRatioMode mode)
  
mediaObject : QMediaObject * const This property holds the media object which provides the video displayed by a graphics item. Access functions:  
 virtual QMediaObject *

mediaObject() const override
  
nativeSize : const QSizeF
 This property holds the native size of the video. Access functions:  
 QSizeF 

nativeSize() const
  Notifier signal:  
 void 

nativeSizeChanged(const QSizeF &size)
  
offset : QPointF
 This property holds the video item's offset. QGraphicsVideoItem will draw video using the offset for its top left corner. Access functions:  
 QPointF 

offset() const
 
 void 

setOffset(const QPointF &offset)
  
size : QSizeF
 This property holds the video item's size. QGraphicsVideoItem will draw video scaled to fit size according to its fillMode. Access functions:  
 QSizeF 

size() const
 
 void 

setSize(const QSizeF &size)
   Member Function Documentation 
QGraphicsVideoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069QGraphicsVideoItem(QGraphicsItem *parent = Q_NULLPTR) Constructs a graphics item that displays video. The parent is passed to QGraphicsItem. 
QGraphicsVideoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069~QGraphicsVideoItem() Destroys a video graphics item. 
[override virtual] QRectF QGraphicsVideoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069oundingRect() const Reimplemented from QGraphicsItem8b7c:f320:99b9:690f:4595:cd17:293a:c069oundingRect(). 
[signal] void QGraphicsVideoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069nativeSizeChanged(const QSizeF &size) Signals that the native size of the video has changed. Note: Notifier signal for property nativeSize.  
[override virtual] void QGraphicsVideoItem8b7c:f320:99b9:690f:4595:cd17:293a:c069paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) Reimplemented from QGraphicsItem8b7c:f320:99b9:690f:4595:cd17:293a:c069paint().

    
{'path': 'public/docs/qt~5.9/qgraphicsvideoitem.html', 'source': 'DevDocs.IO'}