Important: Please read the Qt Code of Conduct -

Selecting a specific camera when multiple 'lenses' are present

  • For devices where there are multiple cameras on the same face (IE- an iPhone 12 has three rear-facing cameras: wide (0.5x), normal (1x), and telephoto (2.5x)) how can I select one of the cameras other than the default (1x)?

    const QList<QCameraInfo> cameras = QCameraInfo::availableCameras(); Only returns two cameras on the iPhone (one front, one rear) even though there are really four (one front, three rear). When creating a QCamera from the QCameraInfo returned for the rear camera, by default instantiates using the 1x camera/lens.

    While the rear camera is selected QCameraFocus::zoomTo will increase the digital zoom of the camera, but changing the optical zoom has no effect. QCameraFocus::maximumOpticalZoom returns 1.0 for the rear camera as well.

Log in to reply