[Qt-interest] Waiting for QProcess to finish without freezing GUI
qzvjtml02 at sneakemail.com
qzvjtml02 at sneakemail.com
Thu Jul 9 22:58:16 CEST 2009
Hello.
I am using QProcess to wrap a GUI around a console application.
Unfortunately, the console application uses the internet, and logs in
on startup. This means that the console application could take FOREVER
to finish, depending on the internet connection. What I'd like to do
is wrap QProcess calls in a modal QProgressDialog. I programmed this
up, but when I call the QProcess stuff I use QProcess::waitForFinish()
so that my application doesn't try to continue without the console
application being started. What this means is that the QProgressDialog
comes up fine, but then my GUI freezes because I called
QProcess::waitForFinish(). I know there's a better way to do this...
does anyone have any advice? Ideally I'd display a "logging in"
QProgressDialog while the console application runs. If the user clicks
the "cancel" button on the QProgressDialog, I kill the QProcess. Is
this possible without the GUI freezing?
Thank you for your help!
Kyle Fazzari
More information about the Qt-interest-old
mailing list