Reputation: 1
I want to build a progress bar that shows the progress of one process which is executed by QProcess::execute(QString);
in my GUI.
Problem is when I execute it, then my GUI hangs and I can't do anything within it.
At least, I would like to to show a loading image which shows the something is happening behind the GUI.
Upvotes: 0
Views: 338
Reputation: 4607
Actually you need to use threads if your GUI is hanging, have a look at QFuture
Upvotes: 0
Reputation: 2713
You'll need to use QProcess::start
rather than execute. Execute will block until the process exits.
QProcess *myProcess = new QProcess(parent);
myProcess->start(program, arguments);
Check the QProcess documentation for more details.
Upvotes: 2