Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4502

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qmessagebox.cpp -->
<head>
  <title>Qt 4.6: Obsolete Members for QMessageBox</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Obsolete Members for QMessageBox</h1>
<p><b>The following class members are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p>
<p><ul><li><a href="qmessagebox.html">QMessageBox class reference</a></li></ul></p>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">typedef </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#Button-typedef">Button</a></b>&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
</table>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#QMessageBox-3">QMessageBox</a></b> ( const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, Icon <i>icon</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i>, QWidget * <i>parent</i> = 0, Qt::WindowFlags <i>f</i> = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#buttonText">buttonText</a></b> ( int <i>button</i> ) const&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#setButtonText">setButtonText</a></b> ( int <i>button</i>, const QString &amp; <i>text</i> )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>4 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
<li><div bar="2" class="fn"></div>3 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
</ul>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#critical-2">critical</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#critical-4">critical</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, const QString &amp; <i>button0Text</i>, const QString &amp; <i>button1Text</i> = QString(), const QString &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#information-2">information</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i> = 0, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#information-4">information</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, const QString &amp; <i>button0Text</i>, const QString &amp; <i>button1Text</i> = QString(), const QString &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#question-2">question</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i> = 0, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#question-4">question</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, const QString &amp; <i>button0Text</i>, const QString &amp; <i>button1Text</i> = QString(), const QString &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPixmap </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#standardIcon-2">standardIcon</a></b> ( Icon <i>icon</i> )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#warning-2">warning</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmessagebox-obsolete.html#warning-4">warning</a></b> ( QWidget * <i>parent</i>, const QString &amp; <i>title</i>, const QString &amp; <i>text</i>, const QString &amp; <i>button0Text</i>, const QString &amp; <i>button1Text</i> = QString(), const QString &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> (obsolete)</tt></td></tr>
</table>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tdef/QMessageBox/Button"></a>
<h3 class="fn"><a name="Button-typedef"></a>typedef QMessageBox::Button</h3>
<p>Use <a href="qmessagebox.html#StandardButton-enum">QMessageBox::StandardButton</a> instead.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QMessageBox-3"></a>QMessageBox::QMessageBox ( const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, <a href="qmessagebox.html#Icon-enum">Icon</a> <i>icon</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>f</i> = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint )</h3>
<p>Constructs a message box with a <i>title</i>, a <i>text</i>, an <i>icon</i>, and up to three buttons.</p>
<p>The <i>icon</i> must be one of the following:</p>
<ul>
<li><a href="qmessagebox.html#Icon-enum">QMessageBox::NoIcon</a></li>
<li><a href="qmessagebox.html#Icon-enum">QMessageBox::Question</a></li>
<li><a href="qmessagebox.html#Icon-enum">QMessageBox::Information</a></li>
<li><a href="qmessagebox.html#Icon-enum">QMessageBox::Warning</a></li>
<li><a href="qmessagebox.html#Icon-enum">QMessageBox::Critical</a></li>
</ul>
<p>Each button, <i>button0</i>, <i>button1</i> and <i>button2</i>, can have one of the following values:</p>
<ul>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Cancel</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Abort</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Retry</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ignore</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::YesAll</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoAll</a></li>
</ul>
<p>Use <a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a> for the later parameters to have fewer than three buttons in your message box. If you don't specify any buttons at all, <a href="qmessagebox.html">QMessageBox</a> will provide an Ok button.</p>
<p>One of the buttons can be OR-ed with the <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Default</a> flag to make it the default button (clicked when Enter is pressed).</p>
<p>One of the buttons can be OR-ed with the <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Escape</a> flag to make it the cancel or close button (clicked when <b>Esc</b> is pressed).</p>
<pre>         QMessageBox mb(&quot;Application Name&quot;,
                        &quot;Hardware failure.\n\nDisk error detected\nDo you want to stop?&quot;,
                        QMessageBox::Question,
                        QMessageBox::Yes | QMessageBox::Default,
                        QMessageBox::No | QMessageBox::Escape,
                        QMessageBox::NoButton);
         if (mb.exec() == QMessageBox::No) {
             <span class="comment">// try again</span></pre>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p>The <i>parent</i> and <i>f</i> arguments are passed to the <a href="qdialog.html">QDialog</a> constructor.</p>
<p>See also <a href="qmessagebox.html#setWindowTitle">setWindowTitle</a>(), <a href="qmessagebox.html#text-prop">setText</a>(), and <a href="qmessagebox.html#icon-prop">setIcon</a>().</p>
<a name="//apple_ref/cpp/instm/QMessageBox/buttonText"></a>
<h3 class="fn"><a name="buttonText"></a><a href="qstring.html">QString</a> QMessageBox::buttonText ( int <i>button</i> ) const</h3>
<p>Returns the text of the message box button <i>button</i>, or an empty string if the message box does not contain the button.</p>
<p>Use <a href="qmessagebox.html#button">button</a>() and <a href="qabstractbutton.html#text-prop">QPushButton::text</a>() instead.</p>
<p>See also <a href="qmessagebox-obsolete.html#setButtonText">setButtonText</a>().</p>
<h3 class="fn"><a name="critical-2"></a>int QMessageBox::critical ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Opens a critical message box with the given <i>title</i> and <i>text</i>. The dialog may have up to three buttons. Each of the button parameters, <i>button0</i>, <i>button1</i> and <i>button2</i> may be set to one of the following values:</p>
<ul>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Cancel</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Abort</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Retry</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ignore</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::YesAll</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoAll</a></li>
</ul>
<p>If you don't want all three buttons, set the last button, or last two buttons to <a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a>.</p>
<p>One button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Default</a>, and one button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Escape</a>.</p>
<p>Returns the identity (<a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a>, or <a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a>, etc.) of the button that was clicked.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#question">question</a>(), and <a href="qmessagebox.html#warning">warning</a>().</p>
<h3 class="fn"><a name="critical-4"></a>int QMessageBox::critical ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qstring.html">QString</a> &amp; <i>button0Text</i>, const <a href="qstring.html">QString</a> &amp; <i>button1Text</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>This is an overloaded function.</p>
<p>Displays a critical error message box with the given <i>title</i> and <i>text</i>, as well as one, two, or three buttons. Returns the number of the button that was clicked (0, 1 or 2).</p>
<p><i>button0Text</i> is the text of the first button, and is optional. If <i>button0Text</i> is not supplied, &quot;OK&quot; (translated) will be used. <i>button1Text</i> is the text of the second button, and is optional, and <i>button2Text</i> is the text of the third button, and is optional. <i>defaultButtonNumber</i> (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). <i>escapeButtonNumber</i> is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1, or 2 to make pressing Escape equivalent to clicking the relevant button.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#question">question</a>(), and <a href="qmessagebox.html#warning">warning</a>().</p>
<h3 class="fn"><a name="information-2"></a>int QMessageBox::information ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i> = 0, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Opens an information message box with the given <i>title</i> and the <i>text</i>. The dialog may have up to three buttons. Each of the buttons, <i>button0</i>, <i>button1</i> and <i>button2</i> may be set to one of the following values:</p>
<ul>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Cancel</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Abort</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Retry</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ignore</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::YesAll</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoAll</a></li>
</ul>
<p>If you don't want all three buttons, set the last button, or last two buttons to <a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a>.</p>
<p>One button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Default</a>, and one button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Escape</a>.</p>
<p>Returns the identity (<a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a>, or <a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a>, etc.) of the button that was clicked.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#question">question</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<h3 class="fn"><a name="information-4"></a>int QMessageBox::information ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qstring.html">QString</a> &amp; <i>button0Text</i>, const <a href="qstring.html">QString</a> &amp; <i>button1Text</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>This is an overloaded function.</p>
<p>Displays an information message box with the given <i>title</i> and <i>text</i>, as well as one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2).</p>
<p><i>button0Text</i> is the text of the first button, and is optional. If <i>button0Text</i> is not supplied, &quot;OK&quot; (translated) will be used. <i>button1Text</i> is the text of the second button, and is optional. <i>button2Text</i> is the text of the third button, and is optional. <i>defaultButtonNumber</i> (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). <i>escapeButtonNumber</i> is the index of the escape button; pressing <b>Esc</b> is the same as clicking this button. It defaults to -1; supply 0, 1 or 2 to make pressing <b>Esc</b> equivalent to clicking the relevant button.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#question">question</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<h3 class="fn"><a name="question-2"></a>int QMessageBox::question ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i> = 0, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Opens a question message box with the given <i>title</i> and <i>text</i>. The dialog may have up to three buttons. Each of the buttons, <i>button0</i>, <i>button1</i> and <i>button2</i> may be set to one of the following values:</p>
<ul>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Cancel</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Abort</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Retry</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ignore</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::YesAll</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoAll</a></li>
</ul>
<p>If you don't want all three buttons, set the last button, or last two buttons to <a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a>.</p>
<p>One button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Default</a>, and one button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Escape</a>.</p>
<p>Returns the identity (<a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a>, or <a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a>, etc.) of the button that was clicked.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<h3 class="fn"><a name="question-4"></a>int QMessageBox::question ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qstring.html">QString</a> &amp; <i>button0Text</i>, const <a href="qstring.html">QString</a> &amp; <i>button1Text</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>This is an overloaded function.</p>
<p>Displays a question message box with the given <i>title</i> and <i>text</i>, as well as one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2).</p>
<p><i>button0Text</i> is the text of the first button, and is optional. If <i>button0Text</i> is not supplied, &quot;OK&quot; (translated) will be used. <i>button1Text</i> is the text of the second button, and is optional. <i>button2Text</i> is the text of the third button, and is optional. <i>defaultButtonNumber</i> (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). <i>escapeButtonNumber</i> is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1 or 2 to make pressing Escape equivalent to clicking the relevant button.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<a name="//apple_ref/cpp/instm/QMessageBox/setButtonText"></a>
<h3 class="fn"><a name="setButtonText"></a>void QMessageBox::setButtonText ( int <i>button</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the text of the message box button <i>button</i> to <i>text</i>. Setting the text of a button that is not in the message box is silently ignored.</p>
<p>Use <a href="qmessagebox.html#addButton">addButton</a>() instead.</p>
<p>See also <a href="qmessagebox-obsolete.html#buttonText">buttonText</a>().</p>
<h3 class="fn"><a name="standardIcon-2"></a><a href="qpixmap.html">QPixmap</a> QMessageBox::standardIcon ( <a href="qmessagebox.html#Icon-enum">Icon</a> <i>icon</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. <i>icon</i> specifies the required icon, e.g&#x2e; <a href="qmessagebox.html#Icon-enum">QMessageBox::Question</a>, <a href="qmessagebox.html#Icon-enum">QMessageBox::Information</a>, <a href="qmessagebox.html#Icon-enum">QMessageBox::Warning</a> or <a href="qmessagebox.html#Icon-enum">QMessageBox::Critical</a>.</p>
<p>Call <a href="qstyle.html#standardIcon">QStyle::standardIcon</a>() with <a href="qstyle.html#StandardPixmap-enum">QStyle::SP_MessageBoxInformation</a> etc. instead.</p>
<h3 class="fn"><a name="warning-2"></a>int QMessageBox::warning ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, int <i>button0</i>, int <i>button1</i>, int <i>button2</i> = 0 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Opens a warning message box with the given <i>title</i> and <i>text</i>. The dialog may have up to three buttons. Each of the button parameters, <i>button0</i>, <i>button1</i> and <i>button2</i> may be set to one of the following values:</p>
<ul>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Cancel</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Yes</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Abort</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Retry</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ignore</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::YesAll</a></li>
<li><a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoAll</a></li>
</ul>
<p>If you don't want all three buttons, set the last button, or last two buttons to <a href="qmessagebox.html#StandardButton-enum">QMessageBox::NoButton</a>.</p>
<p>One button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Default</a>, and one button can be OR-ed with <a href="qmessagebox.html#StandardButton-enum">QMessageBox::Escape</a>.</p>
<p>Returns the identity (<a href="qmessagebox.html#StandardButton-enum">QMessageBox::Ok</a> or <a href="qmessagebox.html#StandardButton-enum">QMessageBox::No</a> or ..&#x2e;) of the button that was clicked.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#question">question</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<h3 class="fn"><a name="warning-4"></a>int QMessageBox::warning ( <a href="qwidget.html">QWidget</a> * <i>parent</i>, const <a href="qstring.html">QString</a> &amp; <i>title</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qstring.html">QString</a> &amp; <i>button0Text</i>, const <a href="qstring.html">QString</a> &amp; <i>button1Text</i> = QString(), const <a href="qstring.html">QString</a> &amp; <i>button2Text</i> = QString(), int <i>defaultButtonNumber</i> = 0, int <i>escapeButtonNumber</i> = -1 )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>This is an overloaded function.</p>
<p>Displays a warning message box with the given <i>title</i> and <i>text</i>, as well as one, two, or three buttons. Returns the number of the button that was clicked (0, 1, or 2).</p>
<p><i>button0Text</i> is the text of the first button, and is optional. If <i>button0Text</i> is not supplied, &quot;OK&quot; (translated) will be used. <i>button1Text</i> is the text of the second button, and is optional, and <i>button2Text</i> is the text of the third button, and is optional. <i>defaultButtonNumber</i> (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). <i>escapeButtonNumber</i> is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1, or 2 to make pressing Escape equivalent to clicking the relevant button.</p>
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If <i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to <i>parent</i>.</p>
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
<p>See also <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#question">question</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>