Qt-interest Archive, November 2007
QProcess GUI freezes
Message 1 in thread
Hi,
I would like to create a QProcess that does not cause my user interface
to freeze, and still be able to use the signals and slots fo QProcess in
the main application. Is it possible? If so would anyone have an example
(haven't found one in the documentation),
Thanks,
Marie
--
[ signature omitted ]
Message 2 in thread
Marie-Christine Vallet wrote:
> Hi,
> I would like to create a QProcess that does not cause my user
> interface to freeze, and still be able to use the signals and slots fo
> QProcess in the main application. Is it possible? If so would anyone
> have an example (haven't found one in the documentation),
> Thanks,
> Marie
>
what I forgot to say is that I would like to display the output in real
time not just when the process is finished. I thought of using a thread,
but the problem is to be able to link the signals of my qprocess to the
main application
--
[ signature omitted ]
Message 3 in thread
On Donnerstag, 1. November 2007, Marie-Christine Vallet wrote:
> Hi,
> I would like to create a QProcess that does not cause my user
> interface to freeze, and still be able to use the signals and slots
> fo QProcess in the main application. Is it possible? If so would
> anyone have an example (haven't found one in the documentation),
QProcess doesn't block your GUI unless you execute it synchronously or
wait for its output. So use the signals and don't use the waitXXX()
functions. If that doesn't work for you I suggest to provide some small
example code that shows the problem.
One example (that doesn't use the output though) is
qdbus/complexpingpong. More examples how to use QProcess are in its API
docs, it is rather simple.
Andreas
--
[ signature omitted ]
Message 4 in thread
On torsdag den 1. November 2007, Marie-Christine Vallet wrote:
> Hi,
> I would like to create a QProcess that does not cause my user interface
> to freeze, and still be able to use the signals and slots fo QProcess in
> the main application. Is it possible? If so would anyone have an example
> (haven't found one in the documentation),
You can do this best by making some kind of report mechanism. So your other
process prints things on stdout, and your host process reads this from
QProcess.
If you don't want this, you have to go to IPC (QDBus) or RPC
(http://www.thorsen-consulting.dk/tcorb.html).
Bo.
--
[ signature omitted ]