QML/C++ interaction problem

Tomaz Canabrava tcanabrava at kde.org
Fri Feb 5 11:02:55 PST 2016


On Fri, Feb 5, 2016 at 4:57 PM, Willem Ferguson <
willemferguson at zoology.up.ac.za> wrote:

> 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
> http://doc.qt.io/qt-5/qtqml-cppintegration-exposecppattributes.html
> The error message in the black section is standard.
> No indication that the QML sees any C++.
>
> In assigning the QML model (see image) I tried several variants including
> model: vendorModel                                  (referencing the model
> object)
> model: vendorModel.getVendorModel       (i.e. referencing a getter
> function that returns a vendorModel)
> model: DownloadManager.vendorModel    (different way of referencing the
> model object)
> model: DownloadManager.getVendorModel  (different way of referencing the
> same getter function)
>
> Which is an appropriate way to convince QML to see the Q_PROPERTY?
>

The model works
what is not working is the DownloadManager,
because you didn't exported it to the QML runtime.



> Kind regards,
> willem
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160205/e82da2c8/attachment.html>


More information about the subsurface mailing list