Qt QProcess::kill() not kill the process

I develop a GUI app in Qt.

This run a python program, with QProcess. In myapp.h file is the pr def:

QProcess *pr = new QProcess(this);

In constructor is this:

QString file = "program/path.py";
pr->start("[...]/Programs/Python/Python38-32/python.exe", QStringList() << file);

And the destructor have this code:

pr->kill();
delete ui;

If I run this program, I don't have errors. I close the window, but this process still run, but I dont know why. I'm working in windows.

I'm beginner in English, sorry.



Read more here: https://stackoverflow.com/questions/68484804/qt-qprocesskill-not-kill-the-process

Content Attribution

This content was originally published by Domkrt at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: