- Qt 6.5
- Qt Multimedia
- QML Types
- cameraDevice
- Qt 6.5.0 Reference Documentation

# cameraDevice QML Value Type

Describes a camera device. More...

Import Statement: | import QtMultimedia

## Properties

- description : string
- id : string
- isDefault : bool
- position : enumeration
- videoFormats : CameraFormat

## Detailed Description

The cameraDevice value type describes the properties of a camera device that is connected to the system.

The list of camera devices can be queried from the MediaDevices type. To select a certain camera device set it as the device on Camera.

     CaptureSession {
         camera: Camera {
             cameraDevice: mediaDevices.defaultVideoInput
         }
     }
     MediaDevices {
         id: mediaDevices
     }

## Property Documentation

description : string

Holds a human readable name of the camera.

Use this string to present the device to the user.

id : string

Holds he device id of the camera

This is a unique ID to identify the camera and may not be human-readable.

isDefault : bool

Is true if this is the default camera device.

position : enumeration

Returns the physical position of the camera on the hardware system.

The returned value can be one of the following:

Constant | Description
--- | ---
`cameraDevice.UnspecifiedPosition` | The camera position is unspecified or unknown.
`cameraDevice.BackFace` | The camera is on the back face of the system hardware. For example on a mobile device, it means it is on the opposite side to that of the screen.
`cameraDevice.FrontFace` | The camera is on the front face of the system hardware. For example on a mobile device, it means it is on the same side as that of the screen.

videoFormats : CameraFormat

Holds the video formats supported by the camera.