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. How to display the list from worker thread to ui thread in Qml which supports real time data changes . data changes.
Forum Updated to NodeBB v4.3 + New Features

How to display the list from worker thread to ui thread in Qml which supports real time data changes . data changes.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 161 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.
  • P Offline
    P Offline
    Pawankumar
    wrote on last edited by
    #1

    There is one class in worker thread and one in another thread if there is change of data in the list from from worker thread class then do i notify to ui thread and make real time data changes .
    Method i have used
    connect(mWorkerThread, &WorkerThread::dataChanged, this, &UIBridge::handleDataChanged);

    where there is a signal in worker thread class which notifies if there is change in the data from worker class to another and the data is fetched from worker thread class and displayed to the qml .

    And also how to display listmodel in qml with the list obtained from worker thread .

    But this approach is not working .
    Any other method which can be used .

    JonBJ 1 Reply Last reply
    0
    • P Pawankumar

      There is one class in worker thread and one in another thread if there is change of data in the list from from worker thread class then do i notify to ui thread and make real time data changes .
      Method i have used
      connect(mWorkerThread, &WorkerThread::dataChanged, this, &UIBridge::handleDataChanged);

      where there is a signal in worker thread class which notifies if there is change in the data from worker class to another and the data is fetched from worker thread class and displayed to the qml .

      And also how to display listmodel in qml with the list obtained from worker thread .

      But this approach is not working .
      Any other method which can be used .

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Pawankumar said in How to display the list from worker thread to ui thread in Qml which supports real time data changes . data changes.:

      But this approach is not working .

      In what sense? Since the approach looks reasonable (I only know about Qt, not QML). Should we guess what does not work? Have you verified that the signal gets raised and the slot gets called, in the correct thread?

      1 Reply Last reply
      1

      • Login

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