Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How do you use QImageCapture now? There's no way to specify a camera.
Stokestack last edited by Stokestack
I'm encountering some aggravation porting a media-streaming application from Qt 5 to 6.2. The multimedia classes have undergone some major restructuring, which I appreciate given that the goal was to clean up their design.
But (meaning no insult to anyone here) the documentation for these classes is in a poor and often unusable state. It refers to nonexistent (deleted) functions, and there's no document talking about how to port multimedia from version 5 to 6. This is essential. I've filed some doc bugs on the things I've found so far.
I think I managed to get most of the way there porting to the new audio-input classes (some missing functions notwithstanding), but I'm stumped as to how to get video into the app now. QCameraImageCapture is gone. The documentation shows that you use QImageCapture and pass a camera into its constructor, but this is wrong. That constructor is explicitly deleted. Look at the Qt code in qimagecapture.h:
// This is here to flag an incompatibilities with Qt 5 QImageCapture(QCamera *) = delete;
Mission accomplished then; it's flagged. Now what?
Thanks for any insight!
You found a documentation bug.
You can use another QObject parent if you want to manage the lifetime of the QImageCapture through Qt's parent/child system.
Otherwise, you can remove the parent.
Doc fix in progress.
Stokestack last edited by
Still... there's no apparent way to specify a video device (like a camera) for QImageCapture.
It's set on the QMediaCaptureSession, isn't it ?