Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Camera in QML, init and start will block the UI thread



  • I'm writing an application with a QML UI, which uses the system's camera. I'm using the QML Camera type to access the camera, and that's all working pretty well; however, I would like to turn off the camera when I'm not using it, and it seems that the proper way to do this is to set Camera.state or call Camera.stop(). Unfortunately, both of these operations seem to cause a ~100ms synchronous operation which blocks the GUI, which is unacceptable for me.

    Does anyone know how I can turn off the camera without blocking the UI thread?


Log in to reply