How to call a Python script in a C ++ code in Qt creator?

Posted on

Question :

How do I call a Python script in a C ++ code in Qt creator?

    

Answer :

Based on in this answer , the way to call any python script by Qt is:

QProcess p;
p.start("python", "script.py");

Remember that it is necessary to have python in the Path of the machine.

    

Leave a Reply

Your email address will not be published. Required fields are marked *