Are you trying to implement the function of scaling / zooming out using the slider, as a regular application for mobile cameras does, if so, then consider the unverified code snippet below, because currently I do not have a machine with Qt IDE installed, but this should help you understand the concept.
Camera { id: camera digitalZoom:zoomSlider.value //if opticalZoom is supported uncomment below line //opticalZoom:zoomSlider.value // rest of your settings } VideoOutput { id: viewfinder source: camera anchors.fill: parent focus : true } Slider { id:zoomSlider orientation: Qt.Vertical minimumValue: 0 maximumValue: camera.maximumDigitalZoom //or camera.maximumOpticalZoom stepSize:camera.maximumDigitalZoom/10 // going through 10 steps value:1.0 // initial zoom level anchors{ left:parent.left leftMargin:5 verticalCenter:parent.verticalCenter } }
and also I would like you to take a look at the official documentation for these types. Slider , Camera . If you need further clarification, write comments below.
source share