I have a simple QMainWindow
in which user can set some parameters.
I have three buttons which, when clicked, create a new QProcess
displaying a QMainWindow
. For example, main window's button A
starts QProcess A
, main window's button B
starts process B
, etc.
I'd like to be able to interact with the main window, because now when I click the button the QProcess
starts correctly, displaying another window etc, but the original main window stays frozen until the QProcess
ends.
Is there a way to maintain the main window responsive, in order to be possible to interact with it WHILE the QProcess/QProcesses runs/run?
EDIT: here's how I start processes:
QProcess process;
process.execute("../../RRTStar/RRTStar", QStringList() << "--file" << "../../settings.conf");
where RRTStar
is the name of the executable and --file ../../settings.conf
are the command line parameters. Note that RRTStar is composed of a MainWindow and runs heavy computation using threads.
Information from the official documentation:
If you want to make asynchronous non-blocking call, you need to use QProcess::start():
About an interaction with the process: it inherites QIODevice, so