[Qt-interest] QProgressBar kind of functionality with QProgressDialog (Size of file being copied not known)

Usman Ajmal uzmanajmal at gmail.com
Wed May 27 08:53:53 CEST 2009


Let me rephrase my question:

Can i show the progress of my operation with the help of a blue fluid moving
to and from in the bar of QProgressDialog?

I want such functionality because i don't know the size of the operation.

I went through QProgressDialog class reference but invain. Kindly suggest
something.

Thanks

On Mon, May 25, 2009 at 12:33 PM, Usman Ajmal <uzmanajmal at gmail.com> wrote:

> Hi,
> I set setMaximum() and setMinimum(), of QProgressBar, equal to zero which
> gave be the ability to show a kinda progress without showing the percentage
> of the operation completed. It only showed a blue fluid moving to and from
> in the bar which showed that something is being copied.
>
> Now i want to have the same kind of progress presentation with
> QProgressDialog but i could not see anything showing up when i start the
> operation. I don't see even the dialog.
>
> Following z the snippet from my code: In following code 'line' is QString
> and 'image' is QTextStream.
>
> QProgressDialog progress("Copying files...", "Abort Copy", 0, 0, this);
> while (!line.isNull())
>             {
>                 if (progress.wasCanceled())
>                      break;
>                 line = in.readLine();
>                 image<<line<<endl;
>
>             }
>
> What else do i need to add here?
>
> Thanks.
>
> --
> Usman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090527/b8121500/attachment.html 


More information about the Qt-interest-old mailing list