Camera functionality not working as expected in Qt 6
-
Re: QCamera switches not to Active State
I have this simple implementation for Camera in qml, but when I try to get the active state of the camera, it gives false and if I try to set the active to true by default, my application crashes. Is there anything wrong with my code. I am migrating my project from Qt 5.15 to Qt 6.4 and have gone through the documentation. My project runs the camera fine on Qt 5.15 but not in Qt 6.4.
I get the below output upon printing default media device:
QCameraDevice(\\?\usb#vid_0c45&pid_6d14&mi_00#6&6d2bd98&0&0000#{e5323777-f976-4f5b-9b55-b94699c46e44}\global, Integrated Webcam, false, UnspecifiedPosition, )Item { id: captureImage height: 300 width: 300 MediaDevices { id: mediaDevices } CaptureSession { camera: Camera { id: camera cameraDevice: mediaDevices.defaultVideoInput whiteBalanceMode: Camera.WhiteBalanceManual focusMode: Camera.FocusModeAutoNear } imageCapture: ImageCapture { id: imageCapture } videoOutput: VideoOutput { id: videoOutput } } } -
Hi,
Do you mean that the example provided with Qt 6 is working properly but not your code ?
-
Hi,
Do you mean that the example provided with Qt 6 is working properly but not your code ?
-
How are you doing things differently from the example ?