First, we should establish whether the device has any cameras. This helps us determine specifics about the use of the camera and other camera specifications, such as the orientation or position on the device.
For this, we will use QCameraInfo.
First, we should establish whether the device has any cameras. This helps us determine specifics about the use of the camera and other camera specifications, such as the orientation or position on the device.
For this, we will use QCameraInfo.
We can get a list of cameras using the QCameraInfo::availableCameras() function:
QList<QCameraInfo> cameras = QCameraInfo::availableCameras();
foreach (const QCameraInfo &cameraInfo, cameras)
ui->textEdit->insertPlainText(cameraInfo.deviceName() + "\n");
On my...