How to set QCamera resolution on Qt 6
Solved
Qt for Python
-
We all know that setting the resolution of the camera in Qt5 is as follows:
There have been many changes to Qt6's multimedia module, among them the deprecation of
QCameraViewfinderSettings
, whichQCameraFormat
recommended in the documentation, so how do I set the resolution of the camera now? I didn't find any information about it. -
Use QCamera.setCameraFormat() to set one of the formats enumerated by QCameraDevice.videoFormats() (obtained via QCamera.cameraDevice()).
-
-