Hello everyone,

I'm trying to use QProcess from QtScript.

I've tried a lot of things, but it seems the only way I can make it build is by using Q_SCRIPT_DECLARE_QMETAOBJECT(QProcess, QObject*), and then do:

Qt Code:
  1. QScriptValue proc = engine.scriptValueFromQMetaObject<QProcess>();
  2. engine.globalObject().setProperty("Process", proc);
To copy to clipboard, switch view to plain text mode 

But then I do in the script:

Qt Code:
  1. var n = new Process();
  2. n.start("someapp");
To copy to clipboard, switch view to plain text mode 

And it results in TypeError: Result of expression 'n.start' [undefined] is not a function.

What am I doing wrong?

Thanks in advance