Qt Reference Documentation

dataloader.js Example File

declarative/threading/threadedlistmodel/dataloader.js
 // ![0]
 WorkerScript.onMessage = function(msg) {
     if (msg.action == 'appendCurrentTime') {
         var data = {'time': new Date().toTimeString()};
         msg.model.append(data);
         msg.model.sync();   // updates the changes to the list
     }
 }
 // ![0]
X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.