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

Last modification:February 15th, 2020 at 09:25 pm
如果觉得我的文章对你有用,请随意赞赏