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

Usman Ajmal uzmanajmal at gmail.com
Mon May 25 09:33:10 CEST 2009


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


More information about the Qt-interest-old mailing list