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. Behaviour of a c++ model update from a different thread from which the QML QtQuick2 engine is running
Forum Updated to NodeBB v4.3 + New Features

Behaviour of a c++ model update from a different thread from which the QML QtQuick2 engine is running

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 526 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    psimona
    wrote on last edited by
    #1

    The scenario has following components:

    • C++ QAbstractItemModel derived model class created in main thread
    • QML QtQuick2 Engine instantiated in main thread
    • Worker boost::thread spawned from main thread upon user interaction

    The relations between these components:

    • The C++ model is exposed through a Q_PROPERTY of a type registered with qmlRegisterSingletonType<>() to the QML Engine.
    • The worker thread updates the model through a method that invokes "emit data_changed(...)"

    The question: in which thread does the callback of the "emit data_changed(...)" happen?

    Note

    A key element in this question is that the started thread is not qt aware.

    This question is also posted here

    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