c++ - QJSEngine vs QtScript and QList<MyClass> -


since qt 5.5 actual, qtscript deprecated. replacement qt qml qjsengine. now, rewrite project new engine. have classes like:

class node : public qobject {     q_object     q_property(qlist<node*> childs read childs)  public:     inline qlist<node*> childs() {         return childsbyid.values();     }     q_invokable qlist<node*> somechilds(qstring filter);     q_invokable node* makechild(/*some args*/); // returns maybe 0.  private:     node(node* parent);      qhash<qstring, node*> childsbyid;     qhash<qstring, node*> childsbyxyz; };  q_declare_metatype(node*) q_declare_metatype(qlist<node*>) 

and in qtscript registered with:

qscriptregistermetatype(&engine, nodetoscriptvalue, nodefromscriptvalue); qscriptregistersequencemetatype<qlist<node*>>(&engine); 

in new qjsengine register node qmlregisteruncreatabletype. but, don't find way register qlist.

knows right way ?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -