- Qt 5.15
- Qt Multimedia
- QMediaControl Proxy Page
- Qt 5.15.19 Reference Documentation

# QMediaControl Proxy Page

## Macros

| Q_MEDIA_DECLARE_CONTROL(Class, IId)

## Macro Documentation

### Q_MEDIA_DECLARE_CONTROL(Class, IId)

The Q_MEDIA_DECLARE_CONTROL macro declares an IId for a Class that inherits from QMediaControl.

Declaring an IId for a QMediaControl allows an instance of that control to be requested from QMediaService::requestControl() without explicitly passing the IId.

     QMediaPlayerControl *control = mediaService->requestControl<QMediaPlayerControl *>();

See also QMediaService::requestControl().