You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
462 B
JavaScript

function callProcess(binary, arguments, callback) {
const component = Qt.createComponent("SimpleProcess.qml");
if (component.status != Component.Ready) {
if (component.status == Component.Error) {
console.debug("Error:" + component.errorString());
}
throw new Error("Error:" + component.errorString());
}
const process = component.createObject(parent, {});
process.onHasFinished.connect(callback);
process.run(binary, arguments);
}