Implementation using python invocation using qprocess
This commit is contained in:
parent
cd67e8ddd7
commit
66937e2cfc
7 changed files with 174 additions and 1 deletions
26
pythonrunner.h
Normal file
26
pythonrunner.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
#ifndef PYTHONRUNNER_H
|
||||
#define PYTHONRUNNER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTextEdit>
|
||||
|
||||
class PythonEmbed;
|
||||
|
||||
class PythonRunner : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PythonRunner(QTextEdit* outputWidget, QObject* parent = nullptr);
|
||||
~PythonRunner();
|
||||
|
||||
public slots:
|
||||
void runScript(const QString& scriptContent);
|
||||
void stopScript();
|
||||
|
||||
private:
|
||||
QTextEdit* m_outputWidget;
|
||||
PythonEmbed* m_pythonEmbed;
|
||||
};
|
||||
|
||||
#endif // PYTHONRUNNER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue