<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 4:57 PM, Willem Ferguson <span dir="ltr"><<a href="mailto:willemferguson@zoology.up.ac.za" target="_blank">willemferguson@zoology.up.ac.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I attach an image with some very short code sections. I closely follow the Qt app note  "Exposing Attributes of C++ Types to QML" at URL<br>
<a href="http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html" rel="noreferrer" target="_blank">http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html</a><br>
The error message in the black section is standard.<br>
No indication that the QML sees any C++.<br>
<br>
In assigning the QML model (see image) I tried several variants including<br>
model: vendorModel                                  (referencing the model object)<br>
model: vendorModel.getVendorModel       (i.e. referencing a getter function that returns a vendorModel)<br>
model: DownloadManager.vendorModel    (different way of referencing the model object)<br>
model: DownloadManager.getVendorModel  (different way of referencing the same getter function)<br>
<br>
Which is an appropriate way to convince QML to see the Q_PROPERTY?<br></blockquote><div><br></div><div>The model works<br></div><div>what is not working is the DownloadManager,<br></div><div>because you didn't exported it to the QML runtime.<br><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Kind regards,<br>
willem<br>
<br>
</blockquote></div><br></div></div>