How to display the list from worker thread to ui thread in Qml which supports real time data changes . data changes.
-
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 . -
@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?