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:
QScriptValue proc = engine.scriptValueFromQMetaObject<QProcess>();
engine.globalObject().setProperty("Process", proc);
QScriptValue proc = engine.scriptValueFromQMetaObject<QProcess>();
engine.globalObject().setProperty("Process", proc);
To copy to clipboard, switch view to plain text mode
But then I do in the script:
var n = new Process();
n.start("someapp");
var n = new Process();
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
Bookmarks