- Qt 5.5
- Qt Multimedia Widgets
- C++ Classes
- QCameraViewfinder
- Qt 5.5.1 Reference Documentation

# QCameraViewfinder Class

The QCameraViewfinder class provides a camera viewfinder widget. More...

Header: | #include <QCameraViewfinder>
qmake: | QT += multimediawidgets
Inherits: | QVideoWidget

- List of all members, including inherited members

## Public Functions

| QCameraViewfinder(QWidget * parent = 0)
| ~QCameraViewfinder()
QMediaObject * | mediaObject() const

- 8 public functions inherited from QVideoWidget

## Protected Functions

bool | setMediaObject(QMediaObject * object)

- 6 protected functions inherited from QVideoWidget

### Additional Inherited Members

- 7 properties inherited from QVideoWidget
- 6 public slots inherited from QVideoWidget
- 5 signals inherited from QVideoWidget

## Detailed Description

The QCameraViewfinder class provides a camera viewfinder widget.

    camera = new QCamera;

    viewfinder = new QCameraViewfinder();
    viewfinder->show();

    camera->setViewfinder(viewfinder);

    imageCapture = new QCameraImageCapture(camera);

    camera->setCaptureMode(QCamera::CaptureStillImage);
    camera->start();

## Member Function Documentation

### QCameraViewfinder::QCameraViewfinder(QWidget * parent = 0)

Constructs a new camera viewfinder widget.

The parent is passed to QVideoWidget.

### QCameraViewfinder::~QCameraViewfinder()

Destroys a camera viewfinder widget.

### QMediaObject * QCameraViewfinder::mediaObject() const

See also setMediaObject().

### `[protected]` bool QCameraViewfinder::setMediaObject(QMediaObject * object)

See also mediaObject().