Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 944

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QProgressDialog Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QProgressDialog Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QProgressDialog class provides feedback on the progress of a
slow operation. <a href="#details">More...</a></p>

<p>Inherits <a href="qdialog.html">QDialog</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qprogressdialog.html#QProgressDialog">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qprogressdialog.html#QProgressDialog-2">__init__</a></b> (<i>self</i>, QString&#160;<i>labelText</i>, QString&#160;<i>cancelButtonText</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" />bool <b><a href="qprogressdialog.html#autoClose">autoClose</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qprogressdialog.html#autoReset">autoReset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#cancel">cancel</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qprogressdialog.html#closeEvent">closeEvent</a></b> (<i>self</i>, QCloseEvent)</li><li><div class="fn" /><b><a href="qprogressdialog.html#forceShow">forceShow</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qprogressdialog.html#labelText">labelText</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressdialog.html#maximum">maximum</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressdialog.html#minimum">minimum</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressdialog.html#minimumDuration">minimumDuration</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#open">open</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#open-2">open</a></b> (<i>self</i>, QObject&#160;<i>receiver</i>, SLOT()SLOT()&#160;<i>member</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#open-3">open</a></b> (<i>self</i>, callable&#160;<i>receiver</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#reset">reset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setAutoClose">setAutoClose</a></b> (<i>self</i>, bool&#160;<i>b</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setAutoReset">setAutoReset</a></b> (<i>self</i>, bool&#160;<i>b</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setBar">setBar</a></b> (<i>self</i>, QProgressBar&#160;<i>bar</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setCancelButton">setCancelButton</a></b> (<i>self</i>, QPushButton&#160;<i>button</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setCancelButtonText">setCancelButtonText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setLabel">setLabel</a></b> (<i>self</i>, QLabel&#160;<i>label</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setLabelText">setLabelText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setMaximum">setMaximum</a></b> (<i>self</i>, int&#160;<i>maximum</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setMinimum">setMinimum</a></b> (<i>self</i>, int&#160;<i>minimum</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setMinimumDuration">setMinimumDuration</a></b> (<i>self</i>, int&#160;<i>ms</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setRange">setRange</a></b> (<i>self</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#setValue">setValue</a></b> (<i>self</i>, int&#160;<i>progress</i>)</li><li><div class="fn" /><b><a href="qprogressdialog.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent&#160;<i>e</i>)</li><li><div class="fn" />QSize <b><a href="qprogressdialog.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressdialog.html#value">value</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qprogressdialog.html#wasCanceled">wasCanceled</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qprogressdialog.html#canceled">canceled</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QProgressDialog class provides feedback on the progress of a
slow operation.</p>
<p>A progress dialog is used to give the user an indication of how
long an operation is going to take, and to demonstrate that the
application has not frozen. It can also give the user an
opportunity to abort the operation.</p>
<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 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="qprogressdialog.html#minimumDuration-prop">minimumDuration</a>()
(4 seconds by default).</p>
<p>Use <a href="qprogressdialog.html#minimum-prop">setMinimum</a>()
and <a href="qprogressdialog.html#maximum-prop">setMaximum</a>() or
the constructor to set the number of "steps" in the operation and
call <a href="qprogressdialog.html#value-prop">setValue</a>() as
the operation progresses. The number of steps 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 the
value set by <a href="qprogressdialog.html#minimum-prop">setMinimum</a>(), and the
progress dialog shows that the operation has finished when you call
<a href="qprogressdialog.html#value-prop">setValue</a>() with the
value set by <a href="qprogressdialog.html#maximum-prop">setMaximum</a>() as its
argument.</p>
<p>The dialog automatically resets and hides itself at the end of
the operation. Use <a href="qprogressdialog.html#autoReset-prop">setAutoReset</a>() and
<a href="qprogressdialog.html#autoClose-prop">setAutoClose</a>() to
change this behavior. Note that if you set a new maximum (using
<a href="qprogressdialog.html#maximum-prop">setMaximum</a>() or
<a href="qprogressdialog.html#setRange">setRange</a>()) that equals
your current <a href="qprogressdialog.html#value-prop">value</a>(),
the dialog will not close regardless.</p>
<p>There are two ways of using QProgressDialog: modal and
modeless.</p>
<p>Compared to a modeless QProgressDialog, a modal QProgressDialog
is simpler to use for the programmer. Do the operation in a loop,
call <a href="qprogressdialog.html#value-prop">setValue</a>() at
intervals, and check for cancellation with <a href="qprogressdialog.html#wasCanceled-prop">wasCanceled</a>(). For
example:</p>
<pre class="cpp">
     <span class="type">QProgressDialog</span> progress(<span class="string">"Copying files..."</span><span class="operator">,</span> <span class="string">"Abort Copy"</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> numFiles<span class="operator">,</span> <span class="keyword">this</span>);
     progress<span class="operator">.</span>setWindowModality(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>WindowModal);

     <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> numFiles; i<span class="operator">+</span><span class="operator">+</span>) {
         progress<span class="operator">.</span>setValue(i);

         <span class="keyword">if</span> (progress<span class="operator">.</span>wasCanceled())
             <span class="keyword">break</span>;
         <span class="comment">//... copy one file</span>
     }
     progress<span class="operator">.</span>setValue(numFiles);
</pre>
<p>A modeless 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="porting4.html#qurloperator">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
modeless progress dialog.</p>
<p>You need to have an event loop to be running, connect the
<a href="qprogressdialog.html#canceled">canceled</a>() signal to a
slot that stops the operation, and call <a href="qprogressdialog.html#value-prop">setValue</a>() at intervals. For
example:</p>
<pre class="cpp">
 <span class="comment">// Operation constructor</span>
 Operation<span class="operator">.</span>Operation(<span class="type"><a href="qobject.html">QObject</a></span> <span class="operator">*</span>parent)
     : <span class="type"><a href="qobject.html">QObject</a></span>(parent)<span class="operator">,</span> steps(<span class="number">0</span>)
 {
     pd <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QProgressDialog</span>(<span class="string">"Operation in progress."</span><span class="operator">,</span> <span class="string">"Cancel"</span><span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">100</span>);
     connect(pd<span class="operator">,</span> SIGNAL(canceled())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(cancel()));
     t <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtimer.html">QTimer</a></span>(<span class="keyword">this</span>);
     connect(t<span class="operator">,</span> SIGNAL(timeout())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(perform()));
     t<span class="operator">-</span><span class="operator">&gt;</span>start(<span class="number">0</span>);
 }

 <span class="type">void</span> Operation<span class="operator">.</span>perform()
 {
     pd<span class="operator">-</span><span class="operator">&gt;</span>setValue(steps);
     <span class="comment">//... perform one percent of the operation</span>
     steps<span class="operator">+</span><span class="operator">+</span>;
     <span class="keyword">if</span> (steps <span class="operator">&gt;</span> pd<span class="operator">-</span><span class="operator">&gt;</span>maximum())
         t<span class="operator">-</span><span class="operator">&gt;</span>stop();
 }

 <span class="type">void</span> Operation<span class="operator">.</span><a href="qprogressdialog.html#cancel">cancel</a>()
 {
     t<span class="operator">-</span><span class="operator">&gt;</span>stop();
     <span class="comment">//... cleanup</span>
 }
</pre>
<p>In both modes the progress dialog may be customized by replacing
the child widgets with custom widgets by using <a href="qprogressdialog.html#setLabel">setLabel</a>(), <a href="qprogressdialog.html#setBar">setBar</a>(), and <a href="qprogressdialog.html#setCancelButton">setCancelButton</a>(). The
functions <a href="qprogressdialog.html#labelText-prop">setLabelText</a>() and
<a href="qprogressdialog.html#setCancelButtonText">setCancelButtonText</a>()
set the texts shown.</p>
<p class="centerAlign"><img alt="A progress dialog shown in the Plastique widget style." src="images/plastique-progressdialog.png" /></p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QProgressDialog" />QProgressDialog.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a progress dialog.</p>
<p>Default settings:</p>
<ul>
<li>The label text is empty.</li>
<li>The cancel button text is (translated) "Cancel".</li>
<li>minimum is 0;</li>
<li>maximum is 100</li>
</ul>
<p>The <i>parent</i> argument is dialog's parent widget. The widget
flags, <i>f</i>, are passed to the <a href="qdialog.html#QDialog">QDialog.QDialog</a>() constructor.</p>
<p><b>See also</b> <a href="qprogressdialog.html#labelText-prop">setLabelText</a>(), <a href="qprogressdialog.html#setCancelButtonText">setCancelButtonText</a>(),
<a href="qprogressdialog.html#setCancelButton">setCancelButton</a>(),
<a href="qprogressdialog.html#minimum-prop">setMinimum</a>(), and
<a href="qprogressdialog.html#maximum-prop">setMaximum</a>().</p>


<h3 class="fn"><a name="QProgressDialog-2" />QProgressDialog.__init__ (<i>self</i>, QString&#160;<i>labelText</i>, QString&#160;<i>cancelButtonText</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a progress dialog.</p>
<p>The <i>labelText</i> is the text used to remind the user what is
progressing.</p>
<p>The <i>cancelButtonText</i> is the text to display on the cancel
button. If QString() is passed then no cancel button is shown.</p>
<p>The <i>minimum</i> and <i>maximum</i> is the number of steps in
the operation for which this progress dialog shows progress. For
example, if the operation is to examine 50 files, this value
minimum value would be 0, and the maximum would be 50. Before
examining the first file, call setValue(0). As each file is
processed call setValue(1), setValue(2), etc., finally calling
setValue(50) after examining the last file.</p>
<p>The <i>parent</i> argument is the dialog's parent widget. The
parent, <i>parent</i>, and widget flags, <i>f</i>, are passed to
the <a href="qdialog.html#QDialog">QDialog.QDialog</a>()
constructor.</p>
<p><b>See also</b> <a href="qprogressdialog.html#labelText-prop">setLabelText</a>(), <a href="qprogressdialog.html#setLabel">setLabel</a>(), <a href="qprogressdialog.html#setCancelButtonText">setCancelButtonText</a>(),
<a href="qprogressdialog.html#setCancelButton">setCancelButton</a>(),
<a href="qprogressdialog.html#minimum-prop">setMinimum</a>(), and
<a href="qprogressdialog.html#maximum-prop">setMaximum</a>().</p>


<h3 class="fn"><a name="autoClose" />bool QProgressDialog.autoClose (<i>self</i>)</h3><h3 class="fn"><a name="autoReset" />bool QProgressDialog.autoReset (<i>self</i>)</h3><h3 class="fn"><a name="cancel" />QProgressDialog.cancel (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void cancel()</tt>.</p><p>Resets the progress dialog. <a href="qprogressdialog.html#wasCanceled-prop">wasCanceled</a>() becomes
true until the progress dialog is reset. The progress dialog
becomes hidden.</p>


<h3 class="fn"><a name="changeEvent" />QProgressDialog.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>


<h3 class="fn"><a name="closeEvent" />QProgressDialog.closeEvent (<i>self</i>, <a href="qcloseevent.html">QCloseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget.closeEvent</a>().</p>


<h3 class="fn"><a name="forceShow" />QProgressDialog.forceShow (<i>self</i>)</h3><p>Shows the dialog if it is still hidden after the algorithm has
been started and <a href="qprogressdialog.html#minimumDuration-prop">minimumDuration</a>
milliseconds have passed.</p>
<p><b>See also</b> <a href="qprogressdialog.html#minimumDuration-prop">setMinimumDuration</a>().</p>


<h3 class="fn"><a name="labelText" />QString QProgressDialog.labelText (<i>self</i>)</h3><h3 class="fn"><a name="maximum" />int QProgressDialog.maximum (<i>self</i>)</h3><h3 class="fn"><a name="minimum" />int QProgressDialog.minimum (<i>self</i>)</h3><h3 class="fn"><a name="minimumDuration" />int QProgressDialog.minimumDuration (<i>self</i>)</h3><h3 class="fn"><a name="open" />QProgressDialog.open (<i>self</i>)</h3><p>This is an overloaded function.</p>
<p>Opens the dialog and connects its <a href="qdialog.html#accepted">accepted</a>() signal to the slot specified
by <i>receiver</i> and <i>member</i>.</p>
<p>The signal will be disconnected from the slot when the dialog is
closed.</p>
<p>This function was introduced in Qt 4.5.</p>


<h3 class="fn"><a name="open-2" />QProgressDialog.open (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>receiver</i>, SLOT()SLOT()&#160;<i>member</i>)</h3><h3 class="fn"><a name="open-3" />QProgressDialog.open (<i>self</i>, callable&#160;<i>receiver</i>)</h3><h3 class="fn"><a name="reset" />QProgressDialog.reset (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void reset()</tt>.</p><p>Resets the progress dialog. The progress dialog becomes hidden
if <a href="qprogressdialog.html#autoClose-prop">autoClose</a>() is
true.</p>
<p><b>See also</b> <a href="qprogressdialog.html#autoClose-prop">setAutoClose</a>() and
<a href="qprogressdialog.html#autoReset-prop">setAutoReset</a>().</p>


<h3 class="fn"><a name="resizeEvent" />QProgressDialog.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>


<h3 class="fn"><a name="setAutoClose" />QProgressDialog.setAutoClose (<i>self</i>, bool&#160;<i>b</i>)</h3><h3 class="fn"><a name="setAutoReset" />QProgressDialog.setAutoReset (<i>self</i>, bool&#160;<i>b</i>)</h3><h3 class="fn"><a name="setBar" />QProgressDialog.setBar (<i>self</i>, <a href="qprogressbar.html">QProgressBar</a>&#160;<i>bar</i>)</h3><p>The <i>bar</i> argument has it's ownership transferred to Qt.</p><p>Sets the progress bar widget to <i>bar</i>. The progress dialog
resizes to fit. The progress dialog takes ownership of the progress
<i>bar</i> which will be deleted when necessary, so do not use a
progress bar allocated on the stack.</p>


<h3 class="fn"><a name="setCancelButton" />QProgressDialog.setCancelButton (<i>self</i>, <a href="qpushbutton.html">QPushButton</a>&#160;<i>button</i>)</h3><p>The <i>button</i> argument has it's ownership transferred to Qt.</p><p>Sets the cancel button to the push button, <i>cancelButton</i>.
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. If 0 is
passed then no cancel button will be shown.</p>
<p><b>See also</b> <a href="qprogressdialog.html#setCancelButtonText">setCancelButtonText</a>().</p>


<h3 class="fn"><a name="setCancelButtonText" />QProgressDialog.setCancelButtonText (<i>self</i>, QString)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCancelButtonText(const QString&amp;)</tt>.</p><p>Sets the cancel button's text to <i>cancelButtonText</i>. If the
text is set to QString() then it will cause the cancel button to be
hidden and deleted.</p>
<p><b>See also</b> <a href="qprogressdialog.html#setCancelButton">setCancelButton</a>().</p>


<h3 class="fn"><a name="setLabel" />QProgressDialog.setLabel (<i>self</i>, <a href="qlabel.html">QLabel</a>&#160;<i>label</i>)</h3><p>The <i>label</i> argument has it's ownership transferred to Qt.</p><p>Sets the label to <i>label</i>. 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><b>See also</b> <a href="qprogressdialog.html#labelText-prop">setLabelText</a>().</p>


<h3 class="fn"><a name="setLabelText" />QProgressDialog.setLabelText (<i>self</i>, QString)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setLabelText(const QString&amp;)</tt>.</p><h3 class="fn"><a name="setMaximum" />QProgressDialog.setMaximum (<i>self</i>, int&#160;<i>maximum</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMaximum(int)</tt>.</p><h3 class="fn"><a name="setMinimum" />QProgressDialog.setMinimum (<i>self</i>, int&#160;<i>minimum</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMinimum(int)</tt>.</p><h3 class="fn"><a name="setMinimumDuration" />QProgressDialog.setMinimumDuration (<i>self</i>, int&#160;<i>ms</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMinimumDuration(int)</tt>.</p><h3 class="fn"><a name="setRange" />QProgressDialog.setRange (<i>self</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>)</h3><p>Sets the progress dialog's minimum and maximum values to
<i>minimum</i> and <i>maximum</i>, respectively.</p>
<p>If <i>maximum</i> is smaller than <i>minimum</i>, <i>minimum</i>
becomes the only legal value.</p>
<p>If the current value falls outside the new range, the progress
dialog is reset with <a href="qprogressdialog.html#reset">reset</a>().</p>
<p><b>See also</b> <a href="qprogressdialog.html#minimum-prop">minimum</a> and <a href="qprogressdialog.html#maximum-prop">maximum</a>.</p>


<h3 class="fn"><a name="setValue" />QProgressDialog.setValue (<i>self</i>, int&#160;<i>progress</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setValue(int)</tt>.</p><h3 class="fn"><a name="showEvent" />QProgressDialog.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QProgressDialog.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>
<p>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.</p>
<h3 class="fn"><a name="value" />int QProgressDialog.value (<i>self</i>)</h3><h3 class="fn"><a name="wasCanceled" />bool QProgressDialog.wasCanceled (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="canceled" />void canceled ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the cancel button is clicked. It is
connected to the <a href="qprogressdialog.html#cancel">cancel</a>()
slot by default.</p>
<p><b>See also</b> <a href="qprogressdialog.html#wasCanceled-prop">wasCanceled</a>().</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>