Return collection from plugin to script environment
shoei321
Posts: 113
I need to return a collection from an SDK plugin, let's say a QList<DzNode*>. This documentation appears to be exactly what I need : http://doc.qt.io/qt-4.8/qscriptengine.html#qScriptRegisterSequenceMetaType
How do I get a pointer to the QScriptEngine in use by the Daz app though? If I just create my own it doesn't work, so I assume Daz has one that I need to use instead.
Thanks!
Comments
We do not provide access to the script engine itself. What you can do, however, is create a public slot on your class that returns a QVariantList. This will be seen by the script environment as an Array of objects of whatever type you put into it (assuming said type is registered).
-Rob
Thanks again Rob, that was what I needed.