17 #include <QtScript/QScriptEngine> 30 qScriptRegisterMetaType(engine, toScriptValue, fromScriptValue);
34 static QScriptValue toScriptValue(QScriptEngine *engine, T*
const &in)
36 return engine->newQObject(in);
39 static void fromScriptValue(
const QScriptValue &
object, T* &out)
41 out = qobject_cast<T*>(
object.toQObject());
Definition: trikCommunicator.h:23
static void registerMetatype(QScriptEngine *engine)
Registers converters from and to script values for a given script engine.
Definition: scriptable.h:28
Helper class that registers converters from and to script values for a given script engine...
Definition: scriptable.h:22