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
哈哈哈,写的太好了https://www.lawjida.com/
真棒!