Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4628

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3progressdialog.cpp -->
  <title>Qt 4.8: Q3ProgressDialog Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3ProgressDialog</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#protected-slots">Protected Slots</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3ProgressDialog Class Reference</h1>
<!-- $$$Q3ProgressDialog-brief -->
<p>The Q3ProgressDialog class provides feedback on the progress of a slow operation. <a href="#details">More...</a></p>
<!-- @@@Q3ProgressDialog -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3ProgressDialog&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qprogressdialog">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="qdialog.html">QDialog</a>.</p>
<ul>
<li><a href="q3progressdialog-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="q3progressdialog.html#autoClose-prop">autoClose</a></b> : bool</li>
<li class="fn"><b><a href="q3progressdialog.html#autoReset-prop">autoReset</a></b> : bool</li>
<li class="fn"><b><a href="q3progressdialog.html#labelText-prop">labelText</a></b> : QString</li>
<li class="fn"><b><a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a></b> : int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="q3progressdialog.html#progress-prop">progress</a></b> : int</li>
<li class="fn"><b><a href="q3progressdialog.html#totalSteps-prop">totalSteps</a></b> : int</li>
<li class="fn"><b><a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a></b> : const bool</li>
<li class="fn"><b><a href="q3progressdialog.html#wasCancelled-prop">wasCancelled</a></b> : const bool</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">2 properties inherited from <a href="qdialog.html#properties">QDialog</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#Q3ProgressDialog">Q3ProgressDialog</a></b> ( QWidget * <i>creator</i>, const char * <i>name</i>, bool <i>modal</i> = false, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#Q3ProgressDialog-2">Q3ProgressDialog</a></b> ( const QString &amp; <i>labelText</i>, const QString &amp; <i>cancelButtonText</i>, int <i>totalSteps</i>, QWidget * <i>creator</i> = 0, const char * <i>name</i> = 0, bool <i>modal</i> = false, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#Q3ProgressDialog-3">Q3ProgressDialog</a></b> ( QWidget * <i>creator</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#Q3ProgressDialog-4">Q3ProgressDialog</a></b> ( const QString &amp; <i>labelText</i>, const QString &amp; <i>cancelButtonText</i>, int <i>totalSteps</i>, QWidget * <i>creator</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#dtor.Q3ProgressDialog">~Q3ProgressDialog</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#autoClose-prop">autoClose</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#autoReset-prop">autoReset</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#labelText-prop">labelText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#progress-prop">progress</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#autoClose-prop">setAutoClose</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#autoReset-prop">setAutoReset</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#setBar">setBar</a></b> ( Q3ProgressBar * <i>bar</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#setCancelButton">setCancelButton</a></b> ( QPushButton * <i>cancelButton</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#setLabel">setLabel</a></b> ( QLabel * <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#totalSteps-prop">totalSteps</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#wasCancelled-prop">wasCancelled</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">8 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#cancel">cancel</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a></b> ( const QString &amp; <i>cancelButtonText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#labelText-prop">setLabelText</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#minimumDuration-prop">setMinimumDuration</a></b> ( int <i>ms</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#progress-prop">setProgress</a></b> ( int <i>progress</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#progress-prop">setProgress</a></b> ( int <i>progress</i>, int <i>totalSteps</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a></b> ( int <i>totalSteps</i> )</td></tr>
</table>
<ul>
<li class="fn">5 public slots inherited from <a href="qdialog.html#public-slots">QDialog</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#canceled">canceled</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#cancelled">cancelled</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">3 signals inherited from <a href="qdialog.html#signals">QDialog</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#changeEvent">changeEvent</a></b> ( QEvent * <i>ev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#showEvent">showEvent</a></b> ( QShowEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">7 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="protected-slots"></a>
<h2>Protected Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3progressdialog.html#forceShow">forceShow</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3ProgressDialog-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3ProgressDialog 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. Q3ProgressDialog 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="q3progressdialog.html#minimumDuration-prop">minimumDuration</a>() (4 seconds by default).</p>
<p>Use <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>() (or the constructor) to set the number of &quot;steps&quot; in the operation and call <a href="q3progressdialog.html#progress-prop">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 finished when you call <a href="q3progressdialog.html#progress-prop">setProgress</a>() with <a href="q3progressdialog.html#totalSteps-prop">totalSteps</a>() as its argument.</p>
<p>The dialog automatically resets and hides itself at the end of the operation. Use <a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>() and <a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>() to change this behavior.</p>
<p>There are two ways of using Q3ProgressDialog: modal and modeless.</p>
<p>Using a modal Q3ProgressDialog is simpler for the programmer, but you must call <a href="qcoreapplication.html#processEvents">QApplication::processEvents</a>() or QEventLoop::processEvents(ExcludeUserInput) to keep the event loop running to ensure that the application doesn't freeze. Do the operation in a loop, call <a href="q3progressdialog.html#progress-prop">setProgress</a>() at intervals, and check for cancellation with <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>(). For example:</p>
<pre class="cpp"> <span class="type">Q3ProgressDialog</span> <a href="q3progressdialog.html#progress-prop">progress</a>(<span class="string">&quot;Copying files...&quot;</span><span class="operator">,</span> <span class="string">&quot;Abort Copy&quot;</span><span class="operator">,</span> numFiles<span class="operator">,</span>
                           <span class="keyword">this</span><span class="operator">,</span> <span class="string">&quot;progress&quot;</span><span class="operator">,</span> <span class="keyword">true</span>);
 <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>setProgress(i);
     qApp<span class="operator">-</span><span class="operator">&gt;</span>processEvents();

     <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><a href="q3progressdialog.html#progress-prop">setProgress</a>(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="q3progressbar.html">Q3ProgressBar</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="q3progressdialog.html#canceled">canceled</a>() signal to a slot that stops the operation, and call <a href="q3progressdialog.html#progress-prop">setProgress</a>() at intervals. For example:</p>
<pre class="cpp"> Operation<span class="operator">::</span>Operation(<span class="type"><a href="qobject.html">QObject</a></span> <span class="operator">*</span>parent <span class="operator">=</span> <span class="number">0</span>)
     : <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">Q3ProgressDialog</span>(<span class="string">&quot;Operation in progress.&quot;</span><span class="operator">,</span> <span class="string">&quot;Cancel&quot;</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>setProgress(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>totalSteps())
         t<span class="operator">-</span><span class="operator">&gt;</span>stop();
 }

 <span class="type">void</span> Operation<span class="operator">::</span><a href="q3progressdialog.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="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setBar">setBar</a>(), and <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(). The functions <a href="q3progressdialog.html#labelText-prop">setLabelText</a>() and <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>() set the texts shown.</p>
<p><img src="images/qprogdlg-m.png" alt="Screenshot in Motif style" /> <img src="images/qprogdlg-w.png" alt="Screenshot in Windows style" /></p>
</div>
<p><b>See also </b><a href="qdialog.html">QDialog</a>, <a href="q3progressbar.html">Q3ProgressBar</a>, and <a href="guibooks.html#fowler">GUI Design Handbook: Progress Indicator</a>.</p>
<!-- @@@Q3ProgressDialog -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoClose-prop$$$autoClose$$$setAutoClosebool -->
<h3 class="fn"><a name="autoClose-prop"></a><span class="name">autoClose</span> : <span class="type">bool</span></h3>
<p>This property holds whether the dialog gets hidden by reset().</p>
<p>The default is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoClose</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoClose</b></span> ( bool <i>b</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>().</p>
<!-- @@@autoClose -->
<!-- $$$autoReset-prop$$$autoReset$$$setAutoResetbool -->
<h3 class="fn"><a name="autoReset-prop"></a><span class="name">autoReset</span> : <span class="type">bool</span></h3>
<p>This property holds whether the progress dialog calls reset() as soon as progress() equals totalSteps().</p>
<p>The default is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoReset</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoReset</b></span> ( bool <i>b</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>().</p>
<!-- @@@autoReset -->
<!-- $$$labelText-prop$$$labelText$$$setLabelTextconstQString& -->
<h3 class="fn"><a name="labelText-prop"></a><span class="name">labelText</span> : <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the label's text.</p>
<p>The default text is an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>labelText</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLabelText</b></span> ( const QString &amp; )</td></tr>
</table>
<!-- @@@labelText -->
<!-- $$$minimumDuration-prop$$$minimumDuration$$$setMinimumDurationint -->
<h3 class="fn"><a name="minimumDuration-prop"></a><span class="name">minimumDuration</span> : <span class="type">int</span></h3>
<p>This property holds the time that must pass before the dialog appears.</p>
<p>If the expected duration of the task is less than the minimumDuration, the dialog will not appear at all. This prevents the dialog popping up for tasks that are quickly over. For tasks that are expected to exceed the minimumDuration, the dialog will pop up after the minimumDuration time or as soon as any progress is set.</p>
<p>If set to 0, the dialog is always shown as soon as any progress is set. The default is 4000 milliseconds.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>minimumDuration</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinimumDuration</b></span> ( int <i>ms</i> )</td></tr>
</table>
<!-- @@@minimumDuration -->
<!-- $$$progress-prop$$$progress$$$setProgressint$$$setProgressintint -->
<h3 class="fn"><a name="progress-prop"></a><span class="name">progress</span> : <span class="type">int</span></h3>
<p>This property holds the current amount of progress made.</p>
<p>For the progress dialog to work as expected, you should initially set this property to 0 and finally set it to <a href="q3progressdialog.html#totalSteps-prop">Q3ProgressDialog::totalSteps</a>(); you can call setProgress() any number of times in-between.</p>
<p><b>Warning:</b> If the progress dialog is modal (see <a href="q3progressdialog.html#Q3ProgressDialog">Q3ProgressDialog::Q3ProgressDialog</a>()), this function calls <a href="qcoreapplication.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 <a href="q3progressdialog.html" class="compat">Q3ProgressDialog</a> inside a <a href="qwidget.html#paintEvent">paintEvent</a>()!</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>progress</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setProgress</b></span> ( int <i>progress</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setProgress</b></span> ( int <i>progress</i>, int <i>totalSteps</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3progressdialog.html#totalSteps-prop">totalSteps</a>.</p>
<!-- @@@progress -->
<!-- $$$totalSteps-prop$$$totalSteps$$$setTotalStepsint -->
<h3 class="fn"><a name="totalSteps-prop"></a><span class="name">totalSteps</span> : <span class="type">int</span></h3>
<p>This property holds the total number of steps.</p>
<p>The default is 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>totalSteps</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTotalSteps</b></span> ( int <i>totalSteps</i> )</td></tr>
</table>
<!-- @@@totalSteps -->
<!-- $$$wasCanceled-prop$$$wasCanceled -->
<h3 class="fn"><a name="wasCanceled-prop"></a><span class="name">wasCanceled</span> : const <span class="type">bool</span></h3>
<p>This property holds whether the dialog was canceled.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>wasCanceled</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="q3progressdialog.html#progress-prop">setProgress</a>().</p>
<!-- @@@wasCanceled -->
<!-- $$$wasCancelled-prop$$$wasCancelled -->
<h3 class="fn"><a name="wasCancelled-prop"></a><span class="name">wasCancelled</span> : const <span class="type">bool</span></h3>
<p>This property holds whether the dialog was canceled.</p>
<p>Use <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a> instead.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>wasCancelled</b></span> () const</td></tr>
</table>
<!-- @@@wasCancelled -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3ProgressDialog[overload1]$$$Q3ProgressDialogQWidget*constchar*boolQt::WindowFlags -->
<h3 class="fn"><a name="Q3ProgressDialog"></a>Q3ProgressDialog::<span class="name">Q3ProgressDialog</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>creator</i>, const <span class="type">char</span> * <i>name</i>, <span class="type">bool</span> <i>modal</i> = false, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<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) &quot;Cancel&quot;.</li>
<li>The total number of steps is 100.</li>
</ul>
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. The <i>name</i>, <i>modal</i>, and the widget flags, <i>f</i>, are passed to the <a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor. If <i>modal</i> is false (the default), you must have an event loop proceeding for any redrawing of the dialog to occur. If <i>modal</i> is true, the dialog ensures that events are processed when needed.</p>
<p><b>See also </b><a href="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
<!-- @@@Q3ProgressDialog -->
<!-- $$$Q3ProgressDialog$$$Q3ProgressDialogconstQString&constQString&intQWidget*constchar*boolQt::WindowFlags -->
<h3 class="fn"><a name="Q3ProgressDialog-2"></a>Q3ProgressDialog::<span class="name">Q3ProgressDialog</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>cancelButtonText</i>, <span class="type">int</span> <i>totalSteps</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>creator</i> = 0, const <span class="type">char</span> * <i>name</i> = 0, <span class="type">bool</span> <i>modal</i> = false, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<p>Constructs a progress dialog.</p>
<p>The <i>labelText</i> is text used to remind the user what is progressing.</p>
<p>The <i>cancelButtonText</i> is the text to display on the cancel button, or 0 if no cancel button is to be shown.</p>
<p>The <i>totalSteps</i> is the total 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 would be 50. Before examining the first file, call setProgress(0). As each file is processed call setProgress(1), setProgress(2), etc., finally calling setProgress(50) after examining the last file.</p>
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. The <i>name</i>, <i>modal</i>, and widget flags, <i>f</i>, are passed to the <a href="qdialog.html#QDialog">QDialog::QDialog</a>() constructor. If <i>modal</i> is false (the default), you will must have an event loop proceeding for any redrawing of the dialog to occur. If <i>modal</i> is true, the dialog ensures that events are processed when needed.</p>
<p><b>See also </b><a href="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
<!-- @@@Q3ProgressDialog -->
<!-- $$$Q3ProgressDialog$$$Q3ProgressDialogQWidget*Qt::WindowFlags -->
<h3 class="fn"><a name="Q3ProgressDialog-3"></a>Q3ProgressDialog::<span class="name">Q3ProgressDialog</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>creator</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<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) &quot;Cancel&quot;.</li>
<li>The total number of steps is 100.</li>
</ul>
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. 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="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
<!-- @@@Q3ProgressDialog -->
<!-- $$$Q3ProgressDialog$$$Q3ProgressDialogconstQString&constQString&intQWidget*Qt::WindowFlags -->
<h3 class="fn"><a name="Q3ProgressDialog-4"></a>Q3ProgressDialog::<span class="name">Q3ProgressDialog</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>cancelButtonText</i>, <span class="type">int</span> <i>totalSteps</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>creator</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<p>Constructs a progress dialog.</p>
<p>The <i>labelText</i> is text used to remind the user what is progressing.</p>
<p>The <i>cancelButtonText</i> is the text to display on the cancel button, or 0 if no cancel button is to be shown.</p>
<p>The <i>totalSteps</i> is the total 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 would be 50. Before examining the first file, call setProgress(0). As each file is processed call setProgress(1), setProgress(2), etc., finally calling setProgress(50) after examining the last file.</p>
<p>The <i>creator</i> argument is the widget to use as the dialog's parent. 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="q3progressdialog.html#labelText-prop">setLabelText</a>(), <a href="q3progressdialog.html#setLabel">setLabel</a>(), <a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>(), <a href="q3progressdialog.html#setCancelButton">setCancelButton</a>(), and <a href="q3progressdialog.html#totalSteps-prop">setTotalSteps</a>().</p>
<!-- @@@Q3ProgressDialog -->
<!-- $$$~Q3ProgressDialog[overload1]$$$~Q3ProgressDialog -->
<h3 class="fn"><a name="dtor.Q3ProgressDialog"></a>Q3ProgressDialog::<span class="name">~Q3ProgressDialog</span> ()</h3>
<p>Destroys the progress dialog.</p>
<!-- @@@~Q3ProgressDialog -->
<!-- $$$cancel[overload1]$$$cancel -->
<h3 class="fn"><a name="cancel"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">cancel</span> ()<tt> [slot]</tt></h3>
<p>Resets the progress dialog. <a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>() becomes true until the progress dialog is reset. The progress dialog becomes hidden.</p>
<!-- @@@cancel -->
<!-- $$$canceled[overload1]$$$canceled -->
<h3 class="fn"><a name="canceled"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">canceled</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the cancel button is clicked. It is connected to the <a href="q3progressdialog.html#cancel">cancel</a>() slot by default.</p>
<p><b>See also </b><a href="q3progressdialog.html#wasCanceled-prop">wasCanceled</a>().</p>
<!-- @@@canceled -->
<!-- $$$cancelled[overload1]$$$cancelled -->
<h3 class="fn"><a name="cancelled"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">cancelled</span> ()<tt> [signal]</tt></h3>
<p>Use <a href="q3progressdialog.html#canceled">canceled</a>() instead.</p>
<!-- @@@cancelled -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$closeEvent[overload1]$$$closeEventQCloseEvent* -->
<h3 class="fn"><a name="closeEvent"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">closeEvent</span> ( <span class="type"><a href="qcloseevent.html">QCloseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>().</p>
<!-- @@@closeEvent -->
<!-- $$$forceShow[overload1]$$$forceShow -->
<h3 class="fn"><a name="forceShow"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">forceShow</span> ()<tt> [protected slot]</tt></h3>
<p>Shows the dialog if it is still hidden after the algorithm has been started and <a href="q3progressdialog.html#minimumDuration-prop">minimumDuration</a> milliseconds have passed.</p>
<p><b>See also </b><a href="q3progressdialog.html#minimumDuration-prop">setMinimumDuration</a>().</p>
<!-- @@@forceShow -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">reset</span> ()<tt> [slot]</tt></h3>
<p>Resets the progress dialog. The progress dialog becomes hidden if <a href="q3progressdialog.html#autoClose-prop">autoClose</a>() is true.</p>
<p><b>See also </b><a href="q3progressdialog.html#autoClose-prop">setAutoClose</a>() and <a href="q3progressdialog.html#autoReset-prop">setAutoReset</a>().</p>
<!-- @@@reset -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$setBar[overload1]$$$setBarQ3ProgressBar* -->
<h3 class="fn"><a name="setBar"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">setBar</span> ( <span class="type"><a href="q3progressbar.html">Q3ProgressBar</a></span> * <i>bar</i> )</h3>
<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>
<!-- @@@setBar -->
<!-- $$$setCancelButton[overload1]$$$setCancelButtonQPushButton* -->
<h3 class="fn"><a name="setCancelButton"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">setCancelButton</span> ( <span class="type"><a href="qpushbutton.html">QPushButton</a></span> * <i>cancelButton</i> )</h3>
<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&#x2e; use new() to create the button.</p>
<p><b>See also </b><a href="q3progressdialog.html#setCancelButtonText">setCancelButtonText</a>().</p>
<!-- @@@setCancelButton -->
<!-- $$$setCancelButtonText[overload1]$$$setCancelButtonTextconstQString& -->
<h3 class="fn"><a name="setCancelButtonText"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">setCancelButtonText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>cancelButtonText</i> )<tt> [slot]</tt></h3>
<p>Sets the cancel button's text to <i>cancelButtonText</i>.</p>
<p><b>See also </b><a href="q3progressdialog.html#setCancelButton">setCancelButton</a>().</p>
<!-- @@@setCancelButtonText -->
<!-- $$$setLabel[overload1]$$$setLabelQLabel* -->
<h3 class="fn"><a name="setLabel"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">setLabel</span> ( <span class="type"><a href="qlabel.html">QLabel</a></span> * <i>label</i> )</h3>
<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="q3progressdialog.html#labelText-prop">setLabelText</a>().</p>
<!-- @@@setLabel -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn"><a name="showEvent"></a><span class="type">void</span> Q3ProgressDialog::<span class="name">showEvent</span> ( <span class="type"><a href="qshowevent.html">QShowEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<!-- @@@showEvent -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3ProgressDialog::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></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>
<!-- @@@sizeHint -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>