Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5174

qt4-doc-4.8.7-26.2.mga7.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" />
<!-- qdialogbuttonbox.cpp -->
  <title>Qt 4.8: QDialogButtonBox 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><a href="qtgui.html">QtGui</a></li>
<li>QDialogButtonBox</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="#public-types">Public Types</a></li>
<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="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QDialogButtonBox Class Reference</h1>
<!-- $$$QDialogButtonBox-brief -->
<p>The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the current widget style. <a href="#details">More...</a></p>
<!-- @@@QDialogButtonBox -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDialogButtonBox&gt;</span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qdialogbuttonbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#ButtonLayout-enum">ButtonLayout</a></b> { WinLayout, MacLayout, KdeLayout, GnomeLayout }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a></b> { InvalidRole, AcceptRole, RejectRole, DestructiveRole, ..., ResetRole }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButton</a></b> { Ok, Open, Save, Cancel, ..., NoButton }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButtons</a></b></td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qdialogbuttonbox.html#centerButtons-prop">centerButtons</a></b> : bool</li>
<li class="fn"><b><a href="qdialogbuttonbox.html#orientation-prop">orientation</a></b> : Qt::Orientation</li>
<li class="fn"><b><a href="qdialogbuttonbox.html#standardButtons-prop">standardButtons</a></b> : StandardButtons</li>
</ul>
<ul>
<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="qdialogbuttonbox.html#QDialogButtonBox">QDialogButtonBox</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#QDialogButtonBox-2">QDialogButtonBox</a></b> ( Qt::Orientation <i>orientation</i>, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#QDialogButtonBox-3">QDialogButtonBox</a></b> ( StandardButtons <i>buttons</i>, Qt::Orientation <i>orientation</i> = Qt::Horizontal, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#dtor.QDialogButtonBox">~QDialogButtonBox</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#addButton">addButton</a></b> ( QAbstractButton * <i>button</i>, ButtonRole <i>role</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPushButton * </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#addButton-2">addButton</a></b> ( const QString &amp; <i>text</i>, ButtonRole <i>role</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPushButton * </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#addButton-3">addButton</a></b> ( StandardButton <i>button</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPushButton * </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#button">button</a></b> ( StandardButton <i>which</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ButtonRole </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#buttonRole">buttonRole</a></b> ( QAbstractButton * <i>button</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QAbstractButton *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#buttons">buttons</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#centerButtons-prop">centerButtons</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Orientation </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#orientation-prop">orientation</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#removeButton">removeButton</a></b> ( QAbstractButton * <i>button</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#centerButtons-prop">setCenterButtons</a></b> ( bool <i>center</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#orientation-prop">setOrientation</a></b> ( Qt::Orientation <i>orientation</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#standardButtons-prop">setStandardButtons</a></b> ( StandardButtons <i>buttons</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> StandardButton </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#standardButton">standardButton</a></b> ( QAbstractButton * <i>button</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> StandardButtons </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#standardButtons-prop">standardButtons</a></b> () const</td></tr>
</table>
<ul>
<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="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#accepted">accepted</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#clicked">clicked</a></b> ( QAbstractButton * <i>button</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#helpRequested">helpRequested</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#rejected">rejected</a></b> ()</td></tr>
</table>
<ul>
<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="qdialogbuttonbox.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qdialogbuttonbox.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
</table>
<ul>
<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>
<h3>Additional Inherited Members</h3>
<ul>
<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>
<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">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>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QDialogButtonBox-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDialogButtonBox class is a widget that presents buttons in a layout that is appropriate to the current widget style.</p>
<p>Dialogs and message boxes typically present buttons in a layout that conforms to the interface guidelines for that platform. Invariably, different platforms have different layouts for their dialogs. QDialogButtonBox allows a developer to add buttons to it and will automatically use the appropriate layout for the user's desktop environment.</p>
<p>Most buttons for a dialog follow certain roles. Such roles include:</p>
<ul>
<li>Accepting or rejecting the dialog.</li>
<li>Asking for help.</li>
<li>Performing actions on the dialog itself (such as resetting fields or applying changes).</li>
</ul>
<p>There can also be alternate ways of dismissing the dialog which may cause destructive results.</p>
<p>Most dialogs have buttons that can almost be considered standard (e.g&#x2e; <b>OK</b> and <b>Cancel</b> buttons). It is sometimes convenient to create these buttons in a standard way.</p>
<p>There are a couple ways of using QDialogButtonBox. One ways is to create the buttons (or button texts) yourself and add them to the button box, specifying their role.</p>
<pre class="cpp">     findButton <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>(tr(<span class="string">&quot;&amp;Find&quot;</span>));
     findButton<span class="operator">-</span><span class="operator">&gt;</span>setDefault(<span class="keyword">true</span>);

     moreButton <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>(tr(<span class="string">&quot;&amp;More&quot;</span>));
     moreButton<span class="operator">-</span><span class="operator">&gt;</span>setCheckable(<span class="keyword">true</span>);
     moreButton<span class="operator">-</span><span class="operator">&gt;</span>setAutoDefault(<span class="keyword">false</span>);

     buttonBox <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QDialogButtonBox</span>(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">::</span>Vertical);
     buttonBox<span class="operator">-</span><span class="operator">&gt;</span>addButton(findButton<span class="operator">,</span> <span class="type">QDialogButtonBox</span><span class="operator">::</span>ActionRole);
     buttonBox<span class="operator">-</span><span class="operator">&gt;</span>addButton(moreButton<span class="operator">,</span> <span class="type">QDialogButtonBox</span><span class="operator">::</span>ActionRole);</pre>
<p>Alternatively, QDialogButtonBox provides several standard buttons (e.g&#x2e; OK, Cancel, Save) that you can use. They exist as flags so you can OR them together in the constructor.</p>
<pre class="cpp">     buttonBox <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QDialogButtonBox</span>(<span class="type">QDialogButtonBox</span><span class="operator">::</span>Ok
                                      <span class="operator">|</span> <span class="type">QDialogButtonBox</span><span class="operator">::</span>Cancel);

     connect(buttonBox<span class="operator">,</span> SIGNAL(accepted())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(accept()));
     connect(buttonBox<span class="operator">,</span> SIGNAL(rejected())<span class="operator">,</span> <span class="keyword">this</span><span class="operator">,</span> SLOT(reject()));</pre>
<p>You can mix and match normal buttons and standard buttons.</p>
<p>Currently the buttons are laid out in the following way if the button box is horizontal:</p>
<table class="generic">
<tr valign="top" class="odd"><td ><img src="images/buttonbox-gnomelayout-horizontal.png" alt="GnomeLayout Horizontal" /></td><td >Button box laid out in horizontal <a href="qdialogbuttonbox.html#ButtonLayout-enum">GnomeLayout</a></td></tr>
<tr valign="top" class="even"><td ><img src="images/buttonbox-kdelayout-horizontal.png" alt="KdeLayout Horizontal" /></td><td >Button box laid out in horizontal <a href="qdialogbuttonbox.html#ButtonLayout-enum">KdeLayout</a></td></tr>
<tr valign="top" class="odd"><td ><img src="images/buttonbox-maclayout-horizontal.png" alt="MacLayout Horizontal" /></td><td >Button box laid out in horizontal <a href="qdialogbuttonbox.html#ButtonLayout-enum">MacLayout</a></td></tr>
<tr valign="top" class="even"><td ><img src="images/buttonbox-winlayout-horizontal.png" alt="WinLayout Horizontal" /></td><td >Button box laid out in horizontal <a href="qdialogbuttonbox.html#ButtonLayout-enum">WinLayout</a></td></tr>
</table>
<p>The buttons are laid out the following way if the button box is vertical:</p>
<table class="generic">
<tr valign="top" class="odd"><td ><a href="qdialogbuttonbox.html#ButtonLayout-enum">GnomeLayout</a></td><td ><a href="qdialogbuttonbox.html#ButtonLayout-enum">KdeLayout</a></td><td ><a href="qdialogbuttonbox.html#ButtonLayout-enum">MacLayout</a></td><td ><a href="qdialogbuttonbox.html#ButtonLayout-enum">WinLayout</a></td></tr>
<tr valign="top" class="even"><td ><img src="images/buttonbox-gnomelayout-vertical.png" alt="GnomeLayout Vertical" /></td><td ><img src="images/buttonbox-kdelayout-vertical.png" alt="KdeLayout Vertical" /></td><td ><img src="images/buttonbox-maclayout-vertical.png" alt="MacLayout Vertical" /></td><td ><img src="images/buttonbox-winlayout-vertical.png" alt="WinLayout Vertical" /></td></tr>
</table>
<p>Additionally, button boxes that contain only buttons with <a href="qdialogbuttonbox.html#ButtonRole-enum">ActionRole</a> or <a href="qdialogbuttonbox.html#ButtonRole-enum">HelpRole</a> can be considered modeless and have an alternate look on Mac OS X:</p>
<table class="generic">
<tr valign="top" class="odd"><td >modeless horizontal <a href="qdialogbuttonbox.html#ButtonLayout-enum">MacLayout</a></td><td ><img src="images/buttonbox-mac-modeless-horizontal.png" alt="Screenshot of modeless horizontal MacLayout" /></td></tr>
</table>
<p>When a button is clicked in the button box, the <a href="qdialogbuttonbox.html#clicked">clicked</a>() signal is emitted for the actual button is that is pressed. For convenience, if the button has an <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>, <a href="qdialogbuttonbox.html#ButtonRole-enum">RejectRole</a>, or <a href="qdialogbuttonbox.html#ButtonRole-enum">HelpRole</a>, the <a href="qdialogbuttonbox.html#accepted">accepted</a>(), <a href="qdialogbuttonbox.html#rejected">rejected</a>(), or <a href="qdialogbuttonbox.html#helpRequested">helpRequested</a>() signals are emitted respectively.</p>
<p>If you want a specific button to be default you need to call <a href="qpushbutton.html#default-prop">QPushButton::setDefault</a>() on it yourself. However, if there is no default button set and to preserve which button is the default button across platforms when using the <a href="qpushbutton.html#autoDefault-prop">QPushButton::autoDefault</a> property, the first push button with the accept role is made the default button when the QDialogButtonBox is shown,</p>
</div>
<p><b>See also </b><a href="qmessagebox.html">QMessageBox</a>, <a href="qpushbutton.html">QPushButton</a>, and <a href="qdialog.html">QDialog</a>.</p>
<!-- @@@QDialogButtonBox -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ButtonLayout$$$WinLayout$$$MacLayout$$$KdeLayout$$$GnomeLayout -->
<h3 class="fn"><a name="ButtonLayout-enum"></a>enum QDialogButtonBox::<span class="name">ButtonLayout</span></h3>
<p>This enum describes the layout policy to be used when arranging the buttons contained in the button box.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::WinLayout</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Use a policy appropriate for applications on Windows.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::MacLayout</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Use a policy appropriate for applications on Mac OS X.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::KdeLayout</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Use a policy appropriate for applications on KDE.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::GnomeLayout</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Use a policy appropriate for applications on GNOME.</td></tr>
</table>
<p>The button layout is specified by the <a href="qwidget.html#style">current style</a>. However, on the X11 platform, it may be influenced by the desktop environment.</p>
<!-- @@@ButtonLayout -->
<!-- $$$ButtonRole$$$InvalidRole$$$AcceptRole$$$RejectRole$$$DestructiveRole$$$ActionRole$$$HelpRole$$$YesRole$$$NoRole$$$ResetRole$$$ApplyRole$$$NRoles -->
<h3 class="fn"><a name="ButtonRole-enum"></a>enum QDialogButtonBox::<span class="name">ButtonRole</span></h3>
<p>This enum describes the roles that can be used to describe buttons in the button box. Combinations of these roles are as flags used to describe different aspects of their behavior.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::InvalidRole</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">The button is invalid.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::AcceptRole</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Clicking the button causes the dialog to be accepted (e.g&#x2e; OK).</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::RejectRole</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Clicking the button causes the dialog to be rejected (e.g&#x2e; Cancel).</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::DestructiveRole</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Clicking the button causes a destructive change (e.g&#x2e; for Discarding Changes) and closes the dialog.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::ActionRole</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Clicking the button causes changes to the elements within the dialog.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::HelpRole</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The button can be clicked to request help.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::YesRole</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">The button is a &quot;Yes&quot;-like button.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::NoRole</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">The button is a &quot;No&quot;-like button.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::ApplyRole</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The button applies current changes.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::ResetRole</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">The button resets the dialog's fields to default values.</td></tr>
</table>
<p><b>See also </b><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButton</a>.</p>
<!-- @@@ButtonRole -->
<!-- $$$StandardButton$$$NoButton$$$Ok$$$Save$$$SaveAll$$$Open$$$Yes$$$YesToAll$$$No$$$NoToAll$$$Abort$$$Retry$$$Ignore$$$Close$$$Cancel$$$Discard$$$Help$$$Apply$$$Reset$$$RestoreDefaults$$$FirstButton$$$LastButton -->
<h3 class="flags"><a name="StandardButton-enum"></a>enum QDialogButtonBox::<span class="name">StandardButton</span><br/>flags QDialogButtonBox::<span class="name">StandardButtons</span></h3>
<p>These enums describe flags for standard buttons. Each button has a defined <a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a>.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Ok</tt></td><td class="topAlign"><tt>0x00000400</tt></td><td class="topAlign">An &quot;OK&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Open</tt></td><td class="topAlign"><tt>0x00002000</tt></td><td class="topAlign">A &quot;Open&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Save</tt></td><td class="topAlign"><tt>0x00000800</tt></td><td class="topAlign">A &quot;Save&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Cancel</tt></td><td class="topAlign"><tt>0x00400000</tt></td><td class="topAlign">A &quot;Cancel&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Close</tt></td><td class="topAlign"><tt>0x00200000</tt></td><td class="topAlign">A &quot;Close&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Discard</tt></td><td class="topAlign"><tt>0x00800000</tt></td><td class="topAlign">A &quot;Discard&quot; or &quot;Don't Save&quot; button, depending on the platform, defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">DestructiveRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Apply</tt></td><td class="topAlign"><tt>0x02000000</tt></td><td class="topAlign">An &quot;Apply&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">ApplyRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Reset</tt></td><td class="topAlign"><tt>0x04000000</tt></td><td class="topAlign">A &quot;Reset&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::RestoreDefaults</tt></td><td class="topAlign"><tt>0x08000000</tt></td><td class="topAlign">A &quot;Restore Defaults&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Help</tt></td><td class="topAlign"><tt>0x01000000</tt></td><td class="topAlign">A &quot;Help&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">HelpRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::SaveAll</tt></td><td class="topAlign"><tt>0x00001000</tt></td><td class="topAlign">A &quot;Save All&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Yes</tt></td><td class="topAlign"><tt>0x00004000</tt></td><td class="topAlign">A &quot;Yes&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">YesRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::YesToAll</tt></td><td class="topAlign"><tt>0x00008000</tt></td><td class="topAlign">A &quot;Yes to All&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">YesRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::No</tt></td><td class="topAlign"><tt>0x00010000</tt></td><td class="topAlign">A &quot;No&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">NoRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::NoToAll</tt></td><td class="topAlign"><tt>0x00020000</tt></td><td class="topAlign">A &quot;No to All&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">NoRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Abort</tt></td><td class="topAlign"><tt>0x00040000</tt></td><td class="topAlign">An &quot;Abort&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Retry</tt></td><td class="topAlign"><tt>0x00080000</tt></td><td class="topAlign">A &quot;Retry&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::Ignore</tt></td><td class="topAlign"><tt>0x00100000</tt></td><td class="topAlign">An &quot;Ignore&quot; button defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr><td class="topAlign"><tt>QDialogButtonBox::NoButton</tt></td><td class="topAlign"><tt>0x00000000</tt></td><td class="topAlign">An invalid button.</td></tr>
</table>
<p>The StandardButtons type is a typedef for <a href="qflags.html">QFlags</a>&lt;StandardButton&gt;. It stores an OR combination of StandardButton values.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a> and <a href="qdialogbuttonbox.html#standardButtons-prop">standardButtons</a>.</p>
<!-- @@@StandardButton -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$centerButtons-prop$$$centerButtons$$$setCenterButtonsbool -->
<h3 class="fn"><a name="centerButtons-prop"></a><span class="name">centerButtons</span> : <span class="type">bool</span></h3>
<p>This property holds whether the buttons in the button box are centered.</p>
<p>By default, this property is false. This behavior is appopriate for most types of dialogs. A notable exception is message boxes on most platforms (e.g&#x2e; Windows), where the button box is centered horizontally.</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>centerButtons</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCenterButtons</b></span> ( bool <i>center</i> )</td></tr>
</table>
<p><b>See also </b><a href="qmessagebox.html">QMessageBox</a>.</p>
<!-- @@@centerButtons -->
<!-- $$$orientation-prop$$$orientation$$$setOrientationQt::Orientation -->
<h3 class="fn"><a name="orientation-prop"></a><span class="name">orientation</span> : <span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span></h3>
<p>This property holds the orientation of the button box.</p>
<p>By default, the orientation is horizontal (i.e&#x2e; the buttons are laid out side by side). The possible orientations are <a href="qt.html#Orientation-enum">Qt::Horizontal</a> and <a href="qt.html#Orientation-enum">Qt::Vertical</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::Orientation </td><td class="memItemRight bottomAlign"><span class="name"><b>orientation</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOrientation</b></span> ( Qt::Orientation <i>orientation</i> )</td></tr>
</table>
<!-- @@@orientation -->
<!-- $$$standardButtons-prop$$$standardButtons$$$setStandardButtonsStandardButtons -->
<h3 class="fn"><a name="standardButtons-prop"></a><span class="name">standardButtons</span> : <span class="type"><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButtons</a></span></h3>
<p>This property holds collection of standard buttons in the button box.</p>
<p>This property controls which standard buttons are used by the button box.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> StandardButtons </td><td class="memItemRight bottomAlign"><span class="name"><b>standardButtons</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setStandardButtons</b></span> ( StandardButtons <i>buttons</i> )</td></tr>
</table>
<p><b>See also </b><a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@standardButtons -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDialogButtonBox[overload1]$$$QDialogButtonBoxQWidget* -->
<h3 class="fn"><a name="QDialogButtonBox"></a>QDialogButtonBox::<span class="name">QDialogButtonBox</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an empty, horizontal button box with the given <i>parent</i>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#orientation-prop">orientation</a> and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@QDialogButtonBox -->
<!-- $$$QDialogButtonBox$$$QDialogButtonBoxQt::OrientationQWidget* -->
<h3 class="fn"><a name="QDialogButtonBox-2"></a>QDialogButtonBox::<span class="name">QDialogButtonBox</span> ( <span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an empty button box with the given <i>orientation</i> and <i>parent</i>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#orientation-prop">orientation</a> and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@QDialogButtonBox -->
<!-- $$$QDialogButtonBox$$$QDialogButtonBoxStandardButtonsQt::OrientationQWidget* -->
<h3 class="fn"><a name="QDialogButtonBox-3"></a>QDialogButtonBox::<span class="name">QDialogButtonBox</span> ( <span class="type"><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButtons</a></span> <i>buttons</i>, <span class="type"><a href="qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i> = Qt::Horizontal, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a button box with the given <i>orientation</i> and <i>parent</i>, containing the standard buttons specified by <i>buttons</i>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#orientation-prop">orientation</a> and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@QDialogButtonBox -->
<!-- $$$~QDialogButtonBox[overload1]$$$~QDialogButtonBox -->
<h3 class="fn"><a name="dtor.QDialogButtonBox"></a>QDialogButtonBox::<span class="name">~QDialogButtonBox</span> ()</h3>
<p>Destroys the button box.</p>
<!-- @@@~QDialogButtonBox -->
<!-- $$$accepted[overload1]$$$accepted -->
<h3 class="fn"><a name="accepted"></a><span class="type">void</span> QDialogButtonBox::<span class="name">accepted</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when a button inside the button box is clicked, as long as it was defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">AcceptRole</a> or <a href="qdialogbuttonbox.html#ButtonRole-enum">YesRole</a>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#rejected">rejected</a>(), <a href="qdialogbuttonbox.html#clicked">clicked</a>(), and <a href="qdialogbuttonbox.html#helpRequested">helpRequested</a>().</p>
<!-- @@@accepted -->
<!-- $$$addButton[overload1]$$$addButtonQAbstractButton*ButtonRole -->
<h3 class="fn"><a name="addButton"></a><span class="type">void</span> QDialogButtonBox::<span class="name">addButton</span> ( <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> * <i>button</i>, <span class="type"><a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a></span> <i>role</i> )</h3>
<p>Adds the given <i>button</i> to the button box with the specified <i>role</i>. If the role is invalid, the button is not added.</p>
<p>If the button has already been added, it is removed and added again with the new role.</p>
<p><b>Note:</b> The button box takes ownership of the button.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#removeButton">removeButton</a>() and <a href="qdialogbuttonbox.html#clear">clear</a>().</p>
<!-- @@@addButton -->
<!-- $$$addButton$$$addButtonconstQString&ButtonRole -->
<h3 class="fn"><a name="addButton-2"></a><span class="type"><a href="qpushbutton.html">QPushButton</a></span> * QDialogButtonBox::<span class="name">addButton</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a></span> <i>role</i> )</h3>
<p>Creates a push button with the given <i>text</i>, adds it to the button box for the specified <i>role</i>, and returns the corresponding push button. If <i>role</i> is invalid, no button is created, and zero is returned.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#removeButton">removeButton</a>() and <a href="qdialogbuttonbox.html#clear">clear</a>().</p>
<!-- @@@addButton -->
<!-- $$$addButton$$$addButtonStandardButton -->
<h3 class="fn"><a name="addButton-3"></a><span class="type"><a href="qpushbutton.html">QPushButton</a></span> * QDialogButtonBox::<span class="name">addButton</span> ( <span class="type"><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButton</a></span> <i>button</i> )</h3>
<p>Adds a standard <i>button</i> to the button box if it is valid to do so, and returns a push button. If <i>button</i> is invalid, it is not added to the button box, and zero is returned.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#removeButton">removeButton</a>() and <a href="qdialogbuttonbox.html#clear">clear</a>().</p>
<!-- @@@addButton -->
<!-- $$$button[overload1]$$$buttonStandardButton -->
<h3 class="fn"><a name="button"></a><span class="type"><a href="qpushbutton.html">QPushButton</a></span> * QDialogButtonBox::<span class="name">button</span> ( <span class="type"><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButton</a></span> <i>which</i> ) const</h3>
<p>Returns the <a href="qpushbutton.html">QPushButton</a> corresponding to the standard button <i>which</i>, or 0 if the standard button doesn't exist in this button box.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#standardButton">standardButton</a>(), <a href="qdialogbuttonbox.html#standardButtons-prop">standardButtons</a>(), and <a href="qdialogbuttonbox.html#buttons">buttons</a>().</p>
<!-- @@@button -->
<!-- $$$buttonRole[overload1]$$$buttonRoleQAbstractButton* -->
<h3 class="fn"><a name="buttonRole"></a><span class="type"><a href="qdialogbuttonbox.html#ButtonRole-enum">ButtonRole</a></span> QDialogButtonBox::<span class="name">buttonRole</span> ( <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> * <i>button</i> ) const</h3>
<p>Returns the button role for the specified <i>button</i>. This function returns <a href="qdialogbuttonbox.html#ButtonRole-enum">InvalidRole</a> if <i>button</i> is 0 or has not been added to the button box.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#buttons">buttons</a>() and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@buttonRole -->
<!-- $$$buttons[overload1]$$$buttons -->
<h3 class="fn"><a name="buttons"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> *&gt; QDialogButtonBox::<span class="name">buttons</span> () const</h3>
<p>Returns a list of all the buttons that have been added to the button box.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#buttonRole">buttonRole</a>(), <a href="qdialogbuttonbox.html#addButton">addButton</a>(), and <a href="qdialogbuttonbox.html#removeButton">removeButton</a>().</p>
<!-- @@@buttons -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QDialogButtonBox::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QDialogButtonBox::<span class="name">clear</span> ()</h3>
<p>Clears the button box, deleting all buttons within it.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#removeButton">removeButton</a>() and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@clear -->
<!-- $$$clicked[overload1]$$$clickedQAbstractButton* -->
<h3 class="fn"><a name="clicked"></a><span class="type">void</span> QDialogButtonBox::<span class="name">clicked</span> ( <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> * <i>button</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when a button inside the button box is clicked. The specific button that was pressed is specified by <i>button</i>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#accepted">accepted</a>(), <a href="qdialogbuttonbox.html#rejected">rejected</a>(), and <a href="qdialogbuttonbox.html#helpRequested">helpRequested</a>().</p>
<!-- @@@clicked -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QDialogButtonBox::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$helpRequested[overload1]$$$helpRequested -->
<h3 class="fn"><a name="helpRequested"></a><span class="type">void</span> QDialogButtonBox::<span class="name">helpRequested</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when a button inside the button box is clicked, as long as it was defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">HelpRole</a>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#accepted">accepted</a>(), <a href="qdialogbuttonbox.html#rejected">rejected</a>(), and <a href="qdialogbuttonbox.html#clicked">clicked</a>().</p>
<!-- @@@helpRequested -->
<!-- $$$rejected[overload1]$$$rejected -->
<h3 class="fn"><a name="rejected"></a><span class="type">void</span> QDialogButtonBox::<span class="name">rejected</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when a button inside the button box is clicked, as long as it was defined with the <a href="qdialogbuttonbox.html#ButtonRole-enum">RejectRole</a> or <a href="qdialogbuttonbox.html#ButtonRole-enum">NoRole</a>.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#accepted">accepted</a>(), <a href="qdialogbuttonbox.html#helpRequested">helpRequested</a>(), and <a href="qdialogbuttonbox.html#clicked">clicked</a>().</p>
<!-- @@@rejected -->
<!-- $$$removeButton[overload1]$$$removeButtonQAbstractButton* -->
<h3 class="fn"><a name="removeButton"></a><span class="type">void</span> QDialogButtonBox::<span class="name">removeButton</span> ( <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> * <i>button</i> )</h3>
<p>Removes <i>button</i> from the button box without deleting it and sets its parent to zero.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#clear">clear</a>(), <a href="qdialogbuttonbox.html#buttons">buttons</a>(), and <a href="qdialogbuttonbox.html#addButton">addButton</a>().</p>
<!-- @@@removeButton -->
<!-- $$$standardButton[overload1]$$$standardButtonQAbstractButton* -->
<h3 class="fn"><a name="standardButton"></a><span class="type"><a href="qdialogbuttonbox.html#StandardButton-enum">StandardButton</a></span> QDialogButtonBox::<span class="name">standardButton</span> ( <span class="type"><a href="qabstractbutton.html">QAbstractButton</a></span> * <i>button</i> ) const</h3>
<p>Returns the standard button enum value corresponding to the given <i>button</i>, or <a href="qdialogbuttonbox.html#StandardButton-enum">NoButton</a> if the given <i>button</i> isn't a standard button.</p>
<p><b>See also </b><a href="qdialogbuttonbox.html#button">button</a>(), <a href="qdialogbuttonbox.html#buttons">buttons</a>(), and <a href="qdialogbuttonbox.html#standardButtons-prop">standardButtons</a>().</p>
<!-- @@@standardButton -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      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>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      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>