Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Transition Camera state without blocking GUI

    QML and Qt Quick
    1
    1
    366
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DigitalPioneer last edited by

      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? I can call out to C++ if necessary, but I'd rather avoid that as I am otherwise managing the camera completely from QML. Thanks. :)

      1 Reply Last reply Reply Quote 0
      • First post
        Last post