Hi,

I have a Qt project with QML ui interface designed to display information coming in about vehicle status. I use a carData object to store the information about the car. Right now, it is implemented like this:
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication a(argc, argv);
  4. MainWindow w;
  5. carData *data = new carData();
  6. w.rootContext()->setContextProperty("data", data);
  7. w.show();
  8. return a.exec();
  9. }
To copy to clipboard, switch view to plain text mode 

However, information on car status is obviously constantly changing, so I want to update the carData object every second or so to reflect the most current data on the car. I can write an update method that will reset the contents of the carData object, but I am wondering how I will be able to do this once w.show() or a.exec() has been called. How can I continuosuly update the object being displayed while the display is already running? Would it work to do something along the lines of:
Qt Code:
  1. while(true) {
  2. data->update();
  3. w.show();
  4. }
To copy to clipboard, switch view to plain text mode