[Qt-interest] newbie: application locks up

john doe thebiggestbangtheory at gmail.com
Fri May 1 09:49:44 CEST 2009


On Fri, May 1, 2009 at 12:46 AM, chandrasekar wagmare <
sekarwagmare at gmail.com> wrote:

>
> u have two ways, invoking an external program using QProcess()
> and if u dont want the gui part freeze use QThread() .
>

awesome! I will look them up.. and since we are on the topic how can I set
up a 2-way communication with the external program to display any error msgs
in a text box or something?

Thanks again


> 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/f6696e2a/attachment.html 


More information about the Qt-interest-old mailing list