CameraFlash QML Type

An interface for flash related camera settings. More...

Import Statement: import QtMultimedia 5.15

Properties

Signals

Detailed Description

This type allows you to operate the camera flash hardware and control the flash mode used. Not all cameras have flash hardware (and in some cases it is shared with the torch hardware).

It should not be constructed separately, instead the flash property of a Camera should be used.

Camera {
    id: camera

    exposure.exposureCompensation: -1.0
    flash.mode: Camera.FlashRedEyeReduction
}

Property Documentation

mode : enumeration

This property holds the camera flash mode.

The mode can be one of the following:

ValueDescription
Camera.FlashOffFlash is Off.
Camera.FlashOnFlash is On.
Camera.FlashAutoAutomatic flash.
Camera.FlashRedEyeReductionRed eye reduction flash.
Camera.FlashFillUse flash to fillin shadows.
Camera.FlashTorchConstant light source. If supported, torch can be enabled without loading the camera.
Camera.FlashVideoLightConstant light source, useful for video capture. The light is turned on only while the camera is active.
Camera.FlashSlowSyncFrontCurtainUse the flash in conjunction with a slow shutter speed. This mode allows better exposure of distant objects and/or motion blur effect.
Camera.FlashSlowSyncRearCurtainThe similar mode to FlashSlowSyncFrontCurtain but flash is fired at the end of exposure.
Camera.FlashManualFlash power is manually set.

ready : bool

This property indicates whether the flash is charged.


supportedModes : list<FlashMode>

This property holds the supported flash modes of the camera. If the list only contains Camera.FlashOff, no flash is supported.

Camera {
    id: camera
    flash {
        onSupportedModesChanged {
            if (flash.supportedModes.length == 1) {
                // no flash supported
            } else {
                // some flash is supported
            }
        }
    }
}

This property was introduced in Qt 5.9.

See also mode.


Signal Documentation

flashModeChanged()

This signal is emitted when the flashMode property is changed. The corresponding handler is onFlashModeChanged.

Note: The corresponding handler is onFlashModeChanged.


flashReady()

This signal is emitted when QCameraExposure indicates that the flash is ready to use. The corresponding handler is onFlashReadyChanged.

Note: The corresponding handler is onFlashReady.


© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.