Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1661

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/dialogs/qprogressdialog.cpp:99 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QProgressDialog Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QProgressDialog Class Reference</h1>

<p>The QProgressDialog class provides feedback on the progress of a slow operation.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qprogressdialog-h.html">qprogressdialog.h</a>&gt;</tt>
<p>Inherits <a href="qdialog.html">QDialog</a>.
<p><a href="qprogressdialog-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QProgressDialog"><b>QProgressDialog</b></a> ( QWidget&nbsp;*&nbsp;creator = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )</div></li>
<li><div class=fn><a href="#QProgressDialog-2"><b>QProgressDialog</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;labelText, const&nbsp;QString&nbsp;&amp;&nbsp;cancelButtonText, int&nbsp;totalSteps, QWidget&nbsp;*&nbsp;creator = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )</div></li>
<li><div class=fn><a href="#~QProgressDialog"><b>~QProgressDialog</b></a> ()</div></li>
<li><div class=fn>void <a href="#setLabel"><b>setLabel</b></a> ( QLabel&nbsp;*&nbsp;label )</div></li>
<li><div class=fn>void <a href="#setCancelButton"><b>setCancelButton</b></a> ( QPushButton&nbsp;*&nbsp;cancelButton )</div></li>
<li><div class=fn>void <a href="#setBar"><b>setBar</b></a> ( QProgressBar&nbsp;*&nbsp;bar )</div></li>
<li><div class=fn>bool <a href="#wasCancelled"><b>wasCancelled</b></a> () const</div></li>
<li><div class=fn>int <a href="#totalSteps"><b>totalSteps</b></a> () const</div></li>
<li><div class=fn>int <a href="#progress"><b>progress</b></a> () const</div></li>
<li><div class=fn>virtual QSize <a href="#sizeHint"><b>sizeHint</b></a> () const</div></li>
<li><div class=fn>QString <a href="#labelText"><b>labelText</b></a> () const</div></li>
<li><div class=fn>void <a href="#setAutoReset"><b>setAutoReset</b></a> ( bool&nbsp;b )</div></li>
<li><div class=fn>bool <a href="#autoReset"><b>autoReset</b></a> () const</div></li>
<li><div class=fn>void <a href="#setAutoClose"><b>setAutoClose</b></a> ( bool&nbsp;b )</div></li>
<li><div class=fn>bool <a href="#autoClose"><b>autoClose</b></a> () const</div></li>
<li><div class=fn>int <a href="#minimumDuration"><b>minimumDuration</b></a> () const</div></li>
</ul>
<h2>Public Slots</h2>
<ul>
<li><div class=fn>void <a href="#cancel"><b>cancel</b></a> ()</div></li>
<li><div class=fn>void <a href="#reset"><b>reset</b></a> ()</div></li>
<li><div class=fn>void <a href="#setTotalSteps"><b>setTotalSteps</b></a> ( int&nbsp;totalSteps )</div></li>
<li><div class=fn>void <a href="#setProgress"><b>setProgress</b></a> ( int&nbsp;progress )</div></li>
<li><div class=fn>void <a href="#setLabelText"><b>setLabelText</b></a> ( const QString &amp; )</div></li>
<li><div class=fn>void <a href="#setCancelButtonText"><b>setCancelButtonText</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;cancelButtonText )</div></li>
<li><div class=fn>void <a href="#setMinimumDuration"><b>setMinimumDuration</b></a> ( int&nbsp;ms )</div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#cancelled"><b>cancelled</b></a> ()</div></li>
</ul>
<h2>Properties</h2>
<ul>
<li><div class=fn>bool <a href="#autoClose-prop"><b>autoClose</b></a>&nbsp;- whether the dialog gets hidden by reset()</div></li>
<li><div class=fn>bool <a href="#autoReset-prop"><b>autoReset</b></a>&nbsp;- whether the progress dialog calls reset() as soon as progress() equals totalSteps()</div></li>
<li><div class=fn>QString <a href="#labelText-prop"><b>labelText</b></a>&nbsp;- the label's text</div></li>
<li><div class=fn>int <a href="#minimumDuration-prop"><b>minimumDuration</b></a>&nbsp;- the time that the progress should run for before the dialog opens</div></li>
<li><div class=fn>int <a href="#progress-prop"><b>progress</b></a>&nbsp;- the current amount of progress made</div></li>
<li><div class=fn>int <a href="#totalSteps-prop"><b>totalSteps</b></a>&nbsp;- the total number of steps</div></li>
<li><div class=fn>bool <a href="#wasCancelled-prop"><b>wasCancelled</b></a>&nbsp;- whether the dialog was cancelled &nbsp;<em>(read only)</em></div></li>
</ul>
<h2>Protected Slots</h2>
<ul>
<li><div class=fn>void <a href="#forceShow"><b>forceShow</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QProgressDialog class provides feedback on the progress of a slow operation.


<p> A progress dialog is used to give the user an indication of how long
an operation is going to take to perform, and to indicate that
the application has not frozen. It can also gives the user an
opportunity to abort the operation.
<p> A common problem with progress dialogs is that it is difficult to know
when to use them; operations take different amounts of time on different
computer hardware.  QProgressDialog offers a solution to this problem:
it estimates the time the operation will take (based on time for
steps), and only shows itself if that estimate is beyond <a href="#minimumDuration">minimumDuration</a>()
(4 seconds by default).
<p> Use <a href="#setTotalSteps">setTotalSteps</a>() (or the constructor) to set the number of
"steps" in the operation and call <a href="#setProgress">setProgress</a>() as the operation
progresses. The step value can be chosen arbitrarily. It can be the
number of files copied, the number of bytes received, the number of
iterations through the main loop of your algorithm, or some other
suitable unit.  Progress starts at 0, and the progress dialog shows
that the operation has completeed when you call setProgress() with
<a href="#totalSteps">totalSteps</a>() as argument.
<p> The dialog automatically resets and hides itself at the end of the
operation. Use <a href="#setAutoReset">setAutoReset</a>() and <a href="#setAutoClose">setAutoClose</a>() to change this
behavior.
<p> There are two ways of using QProgressDialog: modal and non-modal.
<p> Using a modal QProgressDialog is simpler for the programmer, but you
have to call qApp->processEvents() to keep the event loop running
to ensure that the application doesn't freeze. Do the operation in a
loop, call <a href="#setProgress">setProgress</a>() at intervals, and check for cancellation
with <a href="#wasCancelled">wasCancelled</a>(). For example:
<pre>
QProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
                          this, "progress", TRUE );
for ( int i = 0; i &lt; numFiles; i++ ) {
    progress.setProgress( i );
    qApp-&gt;<a href="qapplication.html#processEvents">processEvents</a>();

    if ( progress.wasCancelled() )
        break;
    //... copy one file
}
progress.setProgress( numFiles );
</pre>
 
<p> A non-modal progress dialog is suitable for operations that take
place in the background, where the user is able to interact with the
application. Such operations are typically based on <a href="qtimer.html">QTimer</a> (or
<a href="qobject.html#timerEvent">QObject::timerEvent</a>()), <a href="qsocketnotifier.html">QSocketNotifier</a>, or <a href="qurloperator.html">QUrlOperator</a>; or performed
in a separate thread. A <a href="qprogressbar.html">QProgressBar</a> in the status bar of your main window
is often an alternative to a non-modal progress dialog.
<p> You need an event loop to be running. Connect the <a href="#cancelled">cancelled</a>()
signal to a slot that stops the operation, and call <a href="#setProgress">setProgress</a>() at
intervals. For example:
<pre>
Operation::Operation( <a href="qobject.html">QObject</a> *parent = 0 )
    : <a href="qobject.html">QObject</a>( parent ), steps( 0 )
{
    pd = new QProgressDialog( "Operation in progress.", "Cancel", 100 );
    <a href="qobject.html#connect">connect</a>( pd, SIGNAL(<a href="#cancelled">cancelled</a>()), this, SLOT(<a href="#cancel">cancel</a>()) );
    t = new <a href="qtimer.html">QTimer</a>( this );
    <a href="qobject.html#connect">connect</a>( t, SIGNAL(<a href="qtimer.html#timeout">timeout</a>()), this, SLOT(perform()) );
    t-&gt;<a href="qtimer.html#start">start</a>( 0 );
}

void Operation::perform()
{
    pd-&gt;<a href="#setProgress">setProgress</a>( steps );
    //... perform one percent of the operation
    steps++;
    if ( steps &gt; pd-&gt;<a href="#totalSteps">totalSteps</a>() )
        t-&gt;<a href="qtimer.html#stop">stop</a>();
}

void Operation::cancel()
{
    t-&gt;<a href="qtimer.html#stop">stop</a>();
    //... cleanup
}
</pre>
 
<p> In both modes the progress dialog may be customized by
replacing the child widgets with custom widgets by using <a href="#setLabel">setLabel</a>(),
<a href="#setBar">setBar</a>(), and <a href="#setCancelButton">setCancelButton</a>().
The functions <a href="#setLabelText">setLabelText</a>() and <a href="#setCancelButtonText">setCancelButtonText</a>()
set the texts shown.
<p> <img src=qprogdlg-m.png> <img src=qprogdlg-w.png>
<p> <p>See also <a href="qdialog.html">QDialog</a>, <a href="qprogressbar.html">QProgressBar</a>, <a href="guibooks.html#fowler">GUI Design Handbook: Progress Indicator</a> and <a href="dialogs.html">Dialog Classes</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QProgressDialog"></a>QProgressDialog::QProgressDialog ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;creator = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )
</h3>
Constructs a progress dialog.
<p> Default settings:
<ul>
<li> The label text is empty.
<li> The cancel button text is "Cancel".
<li> The total number of steps is 100.
</ul>
<p> The top level parent of the <em>creator</em> widget becomes the parent of
the dialog. The <em>name</em>, <em>modal</em>, and the <a href="qt.html#WidgetFlags">widget flags</a>, <em>f</em>, are
passed to the <a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor. Note that if <em>modal</em>
is FALSE (the default), you must have an event loop proceeding for
any redrawing of the dialog to occur.  If <em>modal</em> is TRUE, the
dialog ensures that events are processed when needed.
<p> <p>See also <a href="#labelText-prop">labelText</a>, <a href="#setLabel">setLabel</a>(), <a href="#setCancelButtonText">setCancelButtonText</a>(), <a href="#setCancelButton">setCancelButton</a>() and <a href="#totalSteps-prop">totalSteps</a>.

<h3 class=fn><a name="QProgressDialog-2"></a>QProgressDialog::QProgressDialog ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;labelText, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;cancelButtonText, int&nbsp;totalSteps, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;creator = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;f = 0 )
</h3>
Constructs a progress dialog.
<p> The <em>labelText</em> is text used to remind the user what is progressing.
<p> The <em>cancelButtonText</em> is the text to display on the cancel button,
or 0 if no cancel button is to be shown.
<p> The <em>totalSteps</em> is the total number of steps in the operation of
which this progress dialog shows the progress.  For example, if the
operation is to examine 50 files, this value would be 50. Before
examining the first file, call <a href="#setProgress">setProgress</a>(0). As each file is
processed call setProgress(1), setProgress(2), etc., finally
calling setProgress(50) after examining the last file.
<p> The <em>name</em>, <em>modal</em>, and <a href="qt.html#WidgetFlags">widget flags</a>, <em>f</em>, are passed to the
<a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor. Note that if <em>modal</em> is FALSE (the
default), you will need to have an event loop proceeding for any
redrawing of the dialog to occur.  If <em>modal</em> is TRUE, the dialog
ensures that events are processed when needed.
<p> The <em>creator</em> argument is the widget to use as the dialog's parent.
If <em>creator</em> is not a top level widget the argument passed on to
the <a href="qdialog.html">QDialog</a> constructor will be 0.
<p> <p>See also <a href="#labelText-prop">labelText</a>, <a href="#setLabel">setLabel</a>(), <a href="#setCancelButtonText">setCancelButtonText</a>(), <a href="#setCancelButton">setCancelButton</a>() and <a href="#totalSteps-prop">totalSteps</a>.

<h3 class=fn><a name="~QProgressDialog"></a>QProgressDialog::~QProgressDialog ()
</h3>
Destroys the progress dialog.

<h3 class=fn>bool <a name="autoClose"></a>QProgressDialog::autoClose () const
</h3><p>Returns TRUE if the dialog gets hidden by <a href="#reset">reset</a>(); otherwise returns FALSE.
See the <a href="qprogressdialog.html#autoClose-prop">"autoClose"</a> property for details.
<h3 class=fn>bool <a name="autoReset"></a>QProgressDialog::autoReset () const
</h3><p>Returns TRUE if the progress dialog calls <a href="#reset">reset</a>() as soon as <a href="#progress">progress</a>() equals <a href="#totalSteps">totalSteps</a>(); otherwise returns FALSE.
See the <a href="qprogressdialog.html#autoReset-prop">"autoReset"</a> property for details.
<h3 class=fn>void <a name="cancel"></a>QProgressDialog::cancel ()<tt> [slot]</tt>
</h3>
Resets the progress dialog.  <a href="#wasCancelled">wasCancelled</a>() becomes TRUE until
the progress dialog is reset.
The progress dialog becomes hidden.

<h3 class=fn>void <a name="cancelled"></a>QProgressDialog::cancelled ()<tt> [signal]</tt>
</h3>

<p> This signal is emitted when the cancel button is clicked.
It is connected to the <a href="#cancel">cancel</a>() slot by default.
<p> <p>See also <a href="#wasCancelled-prop">wasCancelled</a>.

<p>Example: <a href="progress-example.html#x852">progress/progress.cpp</a>.
<h3 class=fn>void <a name="forceShow"></a>QProgressDialog::forceShow ()<tt> [protected slot]</tt>
</h3>
Shows the dialog if it is still hidden after the algorithm has been started
and the minimumDuration is over.
<p> <p>See also <a href="#minimumDuration-prop">minimumDuration</a>.

<h3 class=fn><a href="qstring.html">QString</a> <a name="labelText"></a>QProgressDialog::labelText () const
</h3><p>Returns the label's text.
See the <a href="qprogressdialog.html#labelText-prop">"labelText"</a> property for details.
<h3 class=fn>int <a name="minimumDuration"></a>QProgressDialog::minimumDuration () const
</h3><p>Returns the time that the progress should run for before the dialog opens.
See the <a href="qprogressdialog.html#minimumDuration-prop">"minimumDuration"</a> property for details.
<h3 class=fn>int <a name="progress"></a>QProgressDialog::progress () const
</h3><p>Returns the current amount of progress made.
See the <a href="qprogressdialog.html#progress-prop">"progress"</a> property for details.
<h3 class=fn>void <a name="reset"></a>QProgressDialog::reset ()<tt> [slot]</tt>
</h3>
Resets the progress dialog.
The progress dialog becomes hidden if <a href="#autoClose">autoClose</a>() is TRUE.
<p> <p>See also <a href="#autoClose-prop">autoClose</a> and <a href="#autoReset-prop">autoReset</a>.

<h3 class=fn>void <a name="setAutoClose"></a>QProgressDialog::setAutoClose ( bool&nbsp;b )
</h3><p>Sets whether the dialog gets hidden by <a href="#reset">reset</a>() to <em>b</em>.
See the <a href="qprogressdialog.html#autoClose-prop">"autoClose"</a> property for details.
<h3 class=fn>void <a name="setAutoReset"></a>QProgressDialog::setAutoReset ( bool&nbsp;b )
</h3><p>Sets whether the progress dialog calls <a href="#reset">reset</a>() as soon as <a href="#progress">progress</a>() equals <a href="#totalSteps">totalSteps</a>() to <em>b</em>.
See the <a href="qprogressdialog.html#autoReset-prop">"autoReset"</a> property for details.
<h3 class=fn>void <a name="setBar"></a>QProgressDialog::setBar ( <a href="qprogressbar.html">QProgressBar</a>&nbsp;*&nbsp;bar )
</h3>
Sets the progress bar widget to <em>bar</em>. The progress dialog resizes to
fit.  The progress dialog takes ownership of the progress <em>bar</em> which
will be deleted when necessary.

<h3 class=fn>void <a name="setCancelButton"></a>QProgressDialog::setCancelButton ( <a href="qpushbutton.html">QPushButton</a>&nbsp;*&nbsp;cancelButton )
</h3>
Sets the cancel button to the push button, <em>cancelButton</em>. The
progress dialog takes ownership of this button which will be deleted
when necessary, so do not pass the address of an object that is on
the stack, i.e. use new() to create the button.
<p> <p>See also <a href="#setCancelButtonText">setCancelButtonText</a>().

<h3 class=fn>void <a name="setCancelButtonText"></a>QProgressDialog::setCancelButtonText ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;cancelButtonText )<tt> [slot]</tt>
</h3>
Sets the cancel button's text to <em>cancelButtonText</em>.
<p>See also <a href="#setCancelButton">setCancelButton</a>().

<h3 class=fn>void <a name="setLabel"></a>QProgressDialog::setLabel ( <a href="qlabel.html">QLabel</a>&nbsp;*&nbsp;label )
</h3>
Sets the label to <em>label</em>. The progress dialog resizes to fit. The
label becomes owned by the progress dialog and will be deleted when
necessary, so do not pass the address of an object on the stack.
<p> <p>See also <a href="#labelText-prop">labelText</a>.

<p>Example: <a href="progress-example.html#x853">progress/progress.cpp</a>.
<h3 class=fn>void <a name="setLabelText"></a>QProgressDialog::setLabelText ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [slot]</tt>
</h3><p>Sets the label's text.
See the <a href="qprogressdialog.html#labelText-prop">"labelText"</a> property for details.
<h3 class=fn>void <a name="setMinimumDuration"></a>QProgressDialog::setMinimumDuration ( int&nbsp;ms )<tt> [slot]</tt>
</h3><p>Sets the time that the progress should run for before the dialog opens to <em>ms</em>.
See the <a href="qprogressdialog.html#minimumDuration-prop">"minimumDuration"</a> property for details.
<h3 class=fn>void <a name="setProgress"></a>QProgressDialog::setProgress ( int&nbsp;progress )<tt> [slot]</tt>
</h3><p>Sets the current amount of progress made to <em>progress</em>.
See the <a href="qprogressdialog.html#progress-prop">"progress"</a> property for details.
<h3 class=fn>void <a name="setTotalSteps"></a>QProgressDialog::setTotalSteps ( int&nbsp;totalSteps )<tt> [slot]</tt>
</h3><p>Sets the total number of steps to <em>totalSteps</em>.
See the <a href="qprogressdialog.html#totalSteps-prop">"totalSteps"</a> property for details.
<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeHint"></a>QProgressDialog::sizeHint () const<tt> [virtual]</tt>
</h3>
Returns a size that fits the contents of the progress dialog.
The progress dialog resizes itself as required, so you should not
need to call this yourself.

<h3 class=fn>int <a name="totalSteps"></a>QProgressDialog::totalSteps () const
</h3><p>Returns the total number of steps.
See the <a href="qprogressdialog.html#totalSteps-prop">"totalSteps"</a> property for details.
<h3 class=fn>bool <a name="wasCancelled"></a>QProgressDialog::wasCancelled () const
</h3><p>Returns TRUE if the dialog was cancelled; otherwise returns FALSE.
See the <a href="qprogressdialog.html#wasCancelled-prop">"wasCancelled"</a> property for details.
<hr><h2>Property Documentation</h2>
<h3 class=fn>bool <a name="autoClose-prop"></a>autoClose</h3>
<p>This property holds whether the dialog gets hidden by <a href="#reset">reset</a>().
<p>The default is TRUE.
<p> <p>See also <a href="#autoReset-prop">autoReset</a>.

<p>Set this property's value with <a href="#setAutoClose">setAutoClose</a>() and get this property's value with <a href="#autoClose">autoClose</a>().
<h3 class=fn>bool <a name="autoReset-prop"></a>autoReset</h3>
<p>This property holds whether the progress dialog calls <a href="#reset">reset</a>() as soon as <a href="#progress">progress</a>() equals <a href="#totalSteps">totalSteps</a>().
<p>The default is TRUE.
<p> <p>See also <a href="#autoClose-prop">autoClose</a>.

<p>Set this property's value with <a href="#setAutoReset">setAutoReset</a>() and get this property's value with <a href="#autoReset">autoReset</a>().
<h3 class=fn><a href="qstring.html">QString</a> <a name="labelText-prop"></a>labelText</h3>
<p>This property holds the label's text.
<p>The default text is QString::null.

<p>Set this property's value with <a href="#setLabelText">setLabelText</a>() and get this property's value with <a href="#labelText">labelText</a>().
<h3 class=fn>int <a name="minimumDuration-prop"></a>minimumDuration</h3>
<p>This property holds the time that the progress should run for before the dialog opens.
<p>The dialog will not appear if the anticipated duration of the
progressing task is less than the minimum duration.
<p> If set to 0, the dialog is always shown as soon as any progress
is set. The default is 4000.

<p>Set this property's value with <a href="#setMinimumDuration">setMinimumDuration</a>() and get this property's value with <a href="#minimumDuration">minimumDuration</a>().
<h3 class=fn>int <a name="progress-prop"></a>progress</h3>
<p>This property holds the current amount of progress made.
<p>For the progress dialog to work as expected, you should initially set
this property to 0 and finally set it to
<a href="#totalSteps">QProgressDialog::totalSteps</a>(); you can call <a href="#setProgress">setProgress</a>() any number of times
in-between.
<p> <b>Warning:</b> If the progress dialog is modal
(see <a href="#QProgressDialog">QProgressDialog::QProgressDialog</a>()),
this function calls <a href="qapplication.html#processEvents">QApplication::processEvents</a>(), so take care that
this does not cause undesirable re-entrancy in your code. For example,
don't use a QProgressDialog inside a <a href="qwidget.html#paintEvent">paintEvent</a>()!
<p> <p>See also <a href="#totalSteps-prop">totalSteps</a>.

<p>Set this property's value with <a href="#setProgress">setProgress</a>() and get this property's value with <a href="#progress">progress</a>().
<h3 class=fn>int <a name="totalSteps-prop"></a>totalSteps</h3>
<p>This property holds the total number of steps.
<p>The default is 0.

<p>Set this property's value with <a href="#setTotalSteps">setTotalSteps</a>() and get this property's value with <a href="#totalSteps">totalSteps</a>().
<h3 class=fn>bool <a name="wasCancelled-prop"></a>wasCancelled</h3>
<p>This property holds whether the dialog was cancelled.
<p>Get this property's value with <a href="#wasCancelled">wasCancelled</a>().
<p><p>See also <a href="#progress-prop">progress</a>.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>