title: Populate C++ model from external source in Qt
body: <p>I need to populate c++ model from a external source (for example USB). I have registered the model in main.cpp like this,</p>
  
  <pre><code>qmlRegisterType&lt;HardwareDataModel&gt;("org.example", 1, 0, "HardwareDataModel");
  </code></pre>
  
  <p>I need to change the private member of this HardwareDataModel class from the external source. Because I would like to change the the private data member of this model and fire signal to qml to change the UI. I got stuck how to proceed as I do not know how to populate those private data members. Do I need to instatiate HardwareDataModel in main.cpp? If yes, how to connect the instatiated HardwareDataModel object and one that is qmlRegisteredType (one shown above).</p>