QML/C++ interaction problem

Willem Ferguson willemferguson at zoology.up.ac.za
Fri Feb 5 10:57:17 PST 2016


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?
Kind regards,
willem

-------------- next part --------------
A non-text attachment was scrubbed...
Name: QML_C++2.jpg
Type: image/jpeg
Size: 75172 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160205/e7759713/attachment-0001.jpg>


More information about the subsurface mailing list