![]() |
Home · All Classes · All Functions · | ![]() |
The QGraphicsVideoItem class provides a graphics item which display video produced by a QMediaObject. More...
#include <QGraphicsVideoItem>
Inherits QObject and QGraphicsItem.
QGraphicsVideoItem ( QMediaObject * object, QGraphicsItem * parent = 0 ) | |
~QGraphicsVideoItem () |
virtual QRectF | boundingRect () const |
virtual void | paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 ) |
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 media object by passing a pointer to the QMediaObject in its constructor, and detached by destroying the QGraphicsVideoItem.
player = new QMediaPlayer(this); graphicsView->scence()->addItem(new QGraphicsVideoItem(player)); graphicsView->show(); player->setMedia(video); player->play();
Note: Only a single display output can be attached to a media object at one time.
See also QMediaObject, QMediaPlayer, and QVideoWidget.
Constructs a graphics item that displays the video produced by a media object.
The parent is passed to QGraphicsItem.
Destroys a video graphics item.
Reimplemented from QGraphicsItem::boundingRect().
Reimplemented from QGraphicsItem::paint().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 (Technical Preview) |