Add support for reading state

This commit is contained in:
Carl Philipp Klemm 2025-10-14 12:59:55 +02:00
parent 1eac3f6a83
commit 4c2a4790c0
12 changed files with 163 additions and 103 deletions

View file

@ -16,7 +16,7 @@ PythonRunner::~PythonRunner() {
}
}
void PythonRunner::runScript(const QString& scriptContent) {
bool PythonRunner::runScript(const QString& scriptContent) {
if (m_process->state() == QProcess::Running) {
m_process->terminate();
m_process->waitForFinished(1000);
@ -24,6 +24,8 @@ void PythonRunner::runScript(const QString& scriptContent) {
m_outputWidget->clear();
m_process->start("python3", QStringList() << "-u" << "-c" << scriptContent);
return true;
}
void PythonRunner::stopScript() {