How to set QCamera resolution on Qt 6
Solved
Qt for Python
-
wrote on 26 Nov 2024, 06:09 last edited by
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. -
wrote on 26 Nov 2024, 06:55 last edited by
-
wrote on 28 Nov 2024, 12:38 last edited by
Use QCamera.setCameraFormat() to set one of the formats enumerated by QCameraDevice.videoFormats() (obtained via QCamera.cameraDevice()).
-
Use QCamera.setCameraFormat() to set one of the formats enumerated by QCameraDevice.videoFormats() (obtained via QCamera.cameraDevice()).
wrote on 30 Nov 2024, 06:19 last edited by -
1/4