Execute qml->build execute file from Another qml gui
Unsolved
QML and Qt Quick
-
Hi everyone,
I'm trying to figure out, how to qml build run file from another qml gui button, when onclicked event happened, it should execute another qml build exe file, I have tried with QProcess, but I'm unable to figure out QProcessEnvironment for qml build.QString filepath="/QML TYPES/build-Task-Desktop_Qt_5_15_0_GCC_64bit-Debug/Task"; QProcess process; QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("TMPDIR", "/home/ubuntu/Qt/5.15.0/gcc_64/bin/qml"); // Add an environment variable env.insert("COMPILER", env.value("Compiler") + "/usr/lib/ccache/x86_64-linux-gnu-g++"); process.setProcessEnvironment(env); process.start(filepath);
But, Unfortunately above code is not working, so, please help to get out of this issue.
Thanks in advance. -
@Joshika_Namani hi
can you see any messages or errors in your 'application output' tab in QtCreator ?
also you can connect a slot to void QProcess::errorOccurred signal -
No, After adding below line.
process.waitForFinished(-1).
but nothing happening. no error , no output.
And, my doubt is that process environment is correct or not.