QVideoWidget Class Reference
The QVideoWidget class provides a widget which presents video produced by a media object. More...
#include <QVideoWidget>
This class is under development and is subject to change.
Inherits QMediaBindableInterface.
Inherited by QCameraViewfinder.
Properties
|
|
Public Functions
| QVideoWidget ( QWidget * parent = 0 ) | |
| ~QVideoWidget () | |
| Qt::AspectRatioMode | aspectRatioMode () const |
| int | brightness () const |
| int | contrast () const |
| int | hue () const |
| bool | isFullScreen () const |
| int | saturation () const |
| QSize | sizeHint () const |
Reimplemented Public Functions
| virtual QMediaObject * | mediaObject () const |
- 1 public function inherited from QMediaBindableInterface
Public Slots
| void | setAspectRatioMode ( Qt::AspectRatioMode mode ) |
| void | setBrightness ( int brightness ) |
| void | setContrast ( int contrast ) |
| void | setFullScreen ( bool fullScreen ) |
| void | setHue ( int hue ) |
| void | setSaturation ( int saturation ) |
Signals
| void | brightnessChanged ( int brightness ) |
| void | contrastChanged ( int contrast ) |
| void | fullScreenChanged ( bool fullScreen ) |
| void | hueChanged ( int hue ) |
| void | saturationChanged ( int saturation ) |
Protected Functions
| void | hideEvent ( QHideEvent * event ) |
| void | moveEvent ( QMoveEvent * event ) |
| void | paintEvent ( QPaintEvent * event ) |
| void | resizeEvent ( QResizeEvent * event ) |
| void | showEvent ( QShowEvent * event ) |
- 1 protected function inherited from QMediaBindableInterface
Detailed Description
The QVideoWidget class provides a widget which presents video produced by a media object.
Attaching a QVideoWidget to a QMediaObject allows it to display the video or image output of that media object. A QVideoWidget is attached to media object by passing a pointer to the QMediaObject in its constructor, and detached by destroying the QVideoWidget.
player = new QMediaPlayer;
widget = new QVideoWidget;
widget->show();
player->setVideoOutput(widget);
player->setMedia(QUrl("http://example.com/movie.mp4"));
player->play();
Note: Only a single display output can be attached to a media object at one time.