QML 攝像頭範例

攝像頭範例展示如何使用 API 捕獲靜止圖像或視頻。

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.

運行範例

要運行範例從 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.

文件:

圖像: