QML Camera Example

Camera Example shows how to use the API to capture a still image or video

The Camera Example shows how to use the API to capture a still image or video.

This example demonstrates how to use the Qt Multimedia QML API to access camera functions. It shows how to change settings and to capture images.

Running the Example

To run the example from Qt Creator , open the Welcome mode and select the example from Examples . For more information, visit Building and Running an Example.

Application Structure

Most of the QML code supports the user interface for this application with the camera types being mostly found in declarative-camera.qml and CaptureControls.qml .

CaptureControls, which is implemented in CaptureControls.qml , generates a column on the right hand side of the screen which includes control buttons for focus (not initially visible), capture, flash modes, white balance, exposure compensation, and if a preview is available, a preview button. The last button exits from the application.

CameraButton.qml Example File

CameraListButton.qml Example File

CameraListPopup.qml Example File

CameraPropertyButton.qml Example File

CameraPropertyPopup.qml Example File

FocusButton.qml Example File

PhotoCaptureControls.qml Example File

PhotoPreview.qml Example File

VideoCaptureControls.qml Example File

VideoPreview.qml Example File

ZoomControl.qml Example File

declarative-camera.qml Example File

qmlcamera.cpp Example File

declarative-camera.pro Example File

declarative-camera.qmlproject Example File

declarative-camera.qrc Example File

camera_auto_mode.png Image File

camera_camera_setting.png Image File

camera_flash_auto.png Image File

camera_flash_fill.png Image File

camera_flash_off.png Image File

camera_flash_redeye.png Image File

camera_white_balance_cloudy.png Image File

camera_white_balance_flourescent.png Image File

camera_white_balance_incandescent.png Image File

camera_white_balance_sunny.png Image File

toolbutton.png Image File