Get a c++ object in QML and use it in javascript -


i'm making application in i'd call function qml in c++ source, , c++ function return me , object can use same properties in javascript part of qml. i've made connection , everything. i've tried send qvariantmap , tried use object in javascript, don't properties of object

there 2 ways exporting qobject based types c++ qml:

  1. return standalone qobject directly property reader or q_invokable function. note, object returned property has c++ ownership, q_invokable-object has js ownership. can change default behaviour via http://doc.qt.nokia.com/4.7/qdeclarativeengine.html#setobjectownership.
  2. return array of qobjects. in case should use qobjectlist, qdeclarativepropertymap (not qvariantmap) or qabstractlistmodel.

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -