Qt 5.11 | Qt Multimedia | C++ Classes | QVideoWindowControl

Qt 5.11.3 Reference Documentation

# QVideoWindowControl Class

The QVideoWindowControl class provides a media control for rendering video to a window. More...

Header: | #include <QVideoWindowControl>
qmake: | QT += multimedia
Inherits: | QMediaControl

- List of all members, including inherited members

## Public Functions

virtual | ~QVideoWindowControl()
virtual Qt::AspectRatioMode | aspectRatioMode() const = 0
virtual int | brightness() const = 0
virtual int | contrast() const = 0
virtual QRect | displayRect() const = 0
virtual int | hue() const = 0
virtual bool | isFullScreen() const = 0
virtual QSize | nativeSize() const = 0
virtual void | repaint() = 0
virtual int | saturation() const = 0
virtual void | setAspectRatioMode(Qt::AspectRatioMode mode) = 0
virtual void | setBrightness(int brightness) = 0
virtual void | setContrast(int contrast) = 0
virtual void | setDisplayRect(const QRect &rect) = 0
virtual void | setFullScreen(bool fullScreen) = 0
virtual void | setHue(int hue) = 0
virtual void | setSaturation(int saturation) = 0
virtual void | setWinId(WId id) = 0
virtual WId | winId() const = 0

## Signals

void | brightnessChanged(int brightness)
void | contrastChanged(int contrast)
void | fullScreenChanged(bool fullScreen)
void | hueChanged(int hue)
void | nativeSizeChanged()
void | saturationChanged(int saturation)

## Protected Functions

| QVideoWindowControl(QObject *parent = nullptr)

## Macros

| QVideoWindowControl_iid

## Detailed Description

The QVideoWindowControl class provides a media control for rendering video to a window.

The winId() property QVideoWindowControl allows a platform specific window ID to be set as the video render target of a QMediaService. The displayRect() property is used to set the region of the window the video should be rendered to, and the aspectRatioMode() property indicates how the video should be scaled to fit the displayRect().

      QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>();
      windowControl->setWinId(widget->winId());
      windowControl->setDisplayRect(widget->rect());
      windowControl->setAspectRatioMode(Qt::KeepAspectRatio);

QVideoWindowControl is one of a number of possible video output controls.

The interface name of QVideoWindowControl is `org.qt-project.qt.videowindowcontrol/5.0` as defined in QVideoWindowControl_iid.

See also QMediaService::requestControl() and QVideoWidget.

## Member Function Documentation

### `[protected]` QVideoWindowControl::QVideoWindowControl(QObject *parent = nullptr)

Constructs a new video window control with the given parent.

### `[virtual]` QVideoWindowControl::~QVideoWindowControl()

Destroys a video window control.

### `[pure virtual]` Qt::AspectRatioMode QVideoWindowControl::aspectRatioMode() const

See also setAspectRatioMode().

### `[pure virtual]` int QVideoWindowControl::brightness() const

See also setBrightness().

### `[signal]` void QVideoWindowControl::brightnessChanged(int brightness)

### `[pure virtual]` int QVideoWindowControl::contrast() const

See also setContrast().

### `[signal]` void QVideoWindowControl::contrastChanged(int contrast)

### `[pure virtual]` QRect QVideoWindowControl::displayRect() const

See also setDisplayRect().

### `[signal]` void QVideoWindowControl::fullScreenChanged(bool fullScreen)

### `[pure virtual]` int QVideoWindowControl::hue() const

See also setHue().

### `[signal]` void QVideoWindowControl::hueChanged(int hue)

### `[pure virtual]` bool QVideoWindowControl::isFullScreen() const

### `[pure virtual]` QSize QVideoWindowControl::nativeSize() const

### `[signal]` void QVideoWindowControl::nativeSizeChanged()

### `[pure virtual]` void QVideoWindowControl::repaint()

### `[pure virtual]` int QVideoWindowControl::saturation() const

See also setSaturation().

### `[signal]` void QVideoWindowControl::saturationChanged(int saturation)

### `[pure virtual]` void QVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)

See also aspectRatioMode().

### `[pure virtual]` void QVideoWindowControl::setBrightness(int brightness)

See also brightness().

### `[pure virtual]` void QVideoWindowControl::setContrast(int contrast)

See also contrast().

### `[pure virtual]` void QVideoWindowControl::setDisplayRect(const QRect &rect)

See also displayRect().

### `[pure virtual]` void QVideoWindowControl::setFullScreen(bool fullScreen)

See also isFullScreen().

### `[pure virtual]` void QVideoWindowControl::setHue(int hue)

See also hue().

### `[pure virtual]` void QVideoWindowControl::setSaturation(int saturation)

See also saturation().

### `[pure virtual]` void QVideoWindowControl::setWinId(WId id)

See also winId().

### `[pure virtual]` WId QVideoWindowControl::winId() const

See also setWinId().

## Macro Documentation

### QVideoWindowControl_iid

`org.qt-project.qt.videowindowcontrol/5.0`

Defines the interface name of the QVideoWindowControl class.