QML 摄像头范例

摄像头范例展示如何使用 API 捕获静止图像或视频。

This example demonstrates how to access camera functions via QML. It shows how to change settings and to capture images.

运行范例

要运行范例从 Qt Creator ,打开 欢迎 模式,然后选择范例从 范例 。更多信息,拜访 构建和运行范例 .

应用程序结构

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.

范例工程 @ code.qt.io