[Qt-interest] Can't i use progressBar->hide() andprogressBar->show() in same block of code ?

Chandru... sekarwagmare at gmail.com
Thu May 28 07:24:06 CEST 2009


use finished() signal of the QProcess() ... when the program ends use the
progressBar->hide();  function ....  also set some value to
myProcess->waitForFinished()
as 2000 or 3000 millisec to check the output termination ...

On Thu, May 28, 2009 at 10:40 AM, Scott Aron Bloom <Scott.Bloom at sabgroup.com
> wrote:

>  You don’t have an eventloop running, call process events  inside your
> loop…
>
>
>
> Scot
>
>
>
> *From:* qt-interest-bounces at trolltech.com [mailto:
> qt-interest-bounces at trolltech.com] *On Behalf Of *Usman Ajmal
> *Sent:* Wednesday, May 27, 2009 9:47 PM
> *To:* qt-interest at trolltech.com
> *Subject:* [Qt-interest] Can't i use progressBar->hide()
> andprogressBar->show() in same block of code ?
>
>
>
> Hi again...
>
> Whenever i use progressBar->hide() and progressBar->show() is same block of
> code, the hide() seems to have overide the show() function and therefore i
> don't see any progress bar busy indicator.
>
> What i am doing is that i first show the busy indicator then i perform my
> operation which takes about 2-3 minutes. After the operation completes i
> wanted to hide the bar.
>
> But i not getting the required functionality. Is it because qmake is a
> compiler, not an interpretor so it sees the progressBar->hile() only that
> comes at the end of code.
>
> Following is the code:
>
>     progressBar->show();
>     QObject *parent;
>     QString program = "dd if=/dev/mem of= of=/home/dump.dt"
>
>     QProcess *myProcess= new QProcess(parent);
>     myProcess->start(program);
>
>     while (myProcess->waitForFinished()) {
>
>      }
>     progressBar->hide();
>
> _______________________________________________
> 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/20090528/094da422/attachment.html 


More information about the Qt-interest-old mailing list