How to Run a batch file from inside a QML file.
-
Hi All,
I have created a QML application. I want to run a batch file from inside a QML file on click of a button.
How to implement the logic.Any help would be appreciated.
Thanks.
-
@JoeCFD JavaScript has no standard way to run an external executable though.
@mbatra Expose a C++ type with an invokable function that runs your script by using
QProcess
.
https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html -
@JoeCFD JavaScript has no standard way to run an external executable though.
@mbatra Expose a C++ type with an invokable function that runs your script by using
QProcess
.
https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html -
@JoeCFD JavaScript has no standard way to run an external executable though.
@mbatra Expose a C++ type with an invokable function that runs your script by using
QProcess
.
https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html -
@GrecKo True. My link seems to use Node.js which QML does not support. QProcess is the way to go.