Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Camera initialisation in background ?
Forum Updated to NodeBB v4.3 + New Features

QML Camera initialisation in background ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
cameraqmlthreading
2 Posts 2 Posters 1.1k Views
  • 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.
  • Y Offline
    Y Offline
    YenZi
    wrote on last edited by YenZi
    #1

    Hi,

    in my application I have a QML Camera element on one page. The problem I have is, that it takes some time till the camera is initialised. Since the app is running on an embedded target (iMX6) this takes 1-2 seconds. During that time, the UI is just blocking. Once the camera has been initialised, everything seems to work pretty smooth. But I need to avoid the blocking of the UI during camera initialisation.

    Since there are a few more pages that will be presented to the user after the app has started, it would be great to present those pages to the user while having the camera initialisation running in the background (separate thread ?) so that the camera is ready by the time it is needed.
    So, I wonder if somebody could give me some hint how this might be possible. I guess, I will have to start an initialisation thread from C++ already or something like that ? As QML itself doesn't really offer threading

    Any hints welcome.

    DiracsbracketD 1 Reply Last reply
    1
    • Y YenZi

      Hi,

      in my application I have a QML Camera element on one page. The problem I have is, that it takes some time till the camera is initialised. Since the app is running on an embedded target (iMX6) this takes 1-2 seconds. During that time, the UI is just blocking. Once the camera has been initialised, everything seems to work pretty smooth. But I need to avoid the blocking of the UI during camera initialisation.

      Since there are a few more pages that will be presented to the user after the app has started, it would be great to present those pages to the user while having the camera initialisation running in the background (separate thread ?) so that the camera is ready by the time it is needed.
      So, I wonder if somebody could give me some hint how this might be possible. I guess, I will have to start an initialisation thread from C++ already or something like that ? As QML itself doesn't really offer threading

      Any hints welcome.

      DiracsbracketD Offline
      DiracsbracketD Offline
      Diracsbracket
      wrote on last edited by Diracsbracket
      #2

      Hi @YenZi
      A little bit late, but could using a Loader and settings its asynchronous property to true work?
      http://doc.qt.io/qt-5/qml-qtquick-loader.html#asynchronous-prop

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved