[Qt-interest] newbie: application locks up

chandrasekar wagmare sekarwagmare at gmail.com
Fri May 1 09:46:13 CEST 2009


u have two ways, invoking an external program using QProcess()
and if u dont want the gui part freeze use QThread() .
On Fri, May 1, 2009 at 1:08 PM, john doe <thebiggestbangtheory at gmail.com>wrote:

> Hello all,
>              Still relative newbie with Qt. I have made my first form
> containing combo buttons, lineedits and whatnot :-). I am facing a problem
> though regarding calling an external program from within the C++ Qt code.
>
> I have a ubuntu system and want to invoke a shell script which does some
> string manipulations on a large file. I used system() within the C++ code to
> do it and it runs. The problem is that when I press a button to start the
> external program, if it takes 10 minutes to finish, the button seems to be
> depressed for this duraion. Basically, like waiting for the program to
> finish. How can I make the button not be depressed for this complete
> duration so that I can possibly start another instance of the external
> program by pressing a button on the main form.
>
> I am not an expert programmer, but I think this smells of asynchronous
> calls..right? Any insight would be greatly appreciated :-).
>
> I did try using a & at the end of the external program I am invoking but
> that does not help. Nothing runs. I am using kdesudo to start the external
> program as it requires certain privileges.
>
> Also I tried to use a progress bar with minimum and max set to 0 to
> continuosly work while the external program is running and it does not seem
> to work. Any pointers to threads/articles?
>
> Thanks in  advance.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
WAGMARE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090501/1f1bd2ac/attachment.html 


More information about the Qt-interest-old mailing list