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.
639 B
639 B
Inspired by http://www.xargs.com/qml/process.html
Setup
Add to project.pro:
HEADERS += \
../../qml-process/process.h
Add to main.cpp
#include <QtQml>
#include "../../qml-process/process.h"
// in main:
qmlRegisterType<Process>("Process", 1, 0, "Process");
also, add the SimpleProcess.qml
and SimpleProcess.js
files to your
project.
The simplest way to use it is to call the callProcess
function:
import "SimpleProcess.js" as SimpleProcess
Item {
Component.onCompleted {
SimpleProcess.callProcess("echo", ["Hello", "World"], (_, stdout)=>console.log(stdout))
}
}