QtQuick Camera和VideoOutput组件的使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Camera {
id: camera
imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
exposure {
exposureCompensation: -1.0
exposureMode: Camera.ExposurePortrait
}
flash.mode: Camera.FlashRedEyeReduction
}

VideoOutput {
id:videoOutput
source: camera
width: 360
height: 400
y:40
anchors.horizontalCenter: fillRec.horizontalCenter
focus: visible // to receive focus and capture key events when visible
fillMode: VideoOutput.PreserveAspectCrop
}

注意要import QtMultimedia 5.9