'How can I get device name from QCameraDevice in Qt 6.3 on Windows10?

there,

On Windows10, Qt 5.15.2, MSVC2019 64bit, in my code,

const QList camera_list = QCameraInfo::availableCameras();

for (const QCameraInfo &camera_info : camera_list) {...}.

I can get "usb#vid_a168&pid_09b0&mi_00#6&27e893a2&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}" from camera_info.deviceName();

but now, Qt 6.3,

const QList cameras = QMediaDevices::videoInputs();

for (const QCameraDevice &cameraDevice : cameras) {...}.

How can I get "usb#vid_a168&pid_09b0&mi_00#6&27e893a2&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}" from QCameraDevice ?

Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source