~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qmessagebox.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMessageBox Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer. <a href="#details">More...</a></p>
10
 
<p>Inherits <a href="qdialog.html">QDialog</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a></b> { InvalidRole, AcceptRole, RejectRole, DestructiveRole, ..., ApplyRole }</li><li><div class="fn" />enum <b><a href="qmessagebox.html#Icon-enum">Icon</a></b> { NoIcon, Information, Warning, Critical, Question }</li><li><div class="fn" />enum <b><a href="qmessagebox.html#StandardButton-enum">StandardButton</a></b> { NoButton, Ok, Save, SaveAll, ..., ButtonMask }</li><li><div class="fn" />class <b><a href="qmessagebox-standardbuttons.html">StandardButtons</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox-2">__init__</a></b> (<i>self</i>, Icon, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.NoButton, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</li><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox-3">__init__</a></b> (<i>self</i>, QString, QString, Icon, int, int, int, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</li><li><div class="fn" /><b><a href="qmessagebox.html#addButton">addButton</a></b> (<i>self</i>, QAbstractButton, ButtonRole)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#addButton-2">addButton</a></b> (<i>self</i>, QString, ButtonRole)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#addButton-3">addButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#button">button</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" />ButtonRole <b><a href="qmessagebox.html#buttonRole">buttonRole</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" />list-of-QAbstractButton <b><a href="qmessagebox.html#buttons">buttons</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#buttonText">buttonText</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qmessagebox.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#clickedButton">clickedButton</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#closeEvent">closeEvent</a></b> (<i>self</i>, QCloseEvent)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#defaultButton">defaultButton</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#detailedText">detailedText</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#escapeButton">escapeButton</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmessagebox.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />Icon <b><a href="qmessagebox.html#icon">icon</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qmessagebox.html#iconPixmap">iconPixmap</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#informativeText">informativeText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qmessagebox.html#open">open</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#open-2">open</a></b> (<i>self</i>, QObject, SLOT()SLOT())</li><li><div class="fn" /><b><a href="qmessagebox.html#open-3">open</a></b> (<i>self</i>, callable)</li><li><div class="fn" /><b><a href="qmessagebox.html#removeButton">removeButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" /><b><a href="qmessagebox.html#setButtonText">setButtonText</a></b> (<i>self</i>, int, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDefaultButton">setDefaultButton</a></b> (<i>self</i>, QPushButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDefaultButton-2">setDefaultButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDetailedText">setDetailedText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setEscapeButton">setEscapeButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setEscapeButton-2">setEscapeButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setIcon">setIcon</a></b> (<i>self</i>, Icon)</li><li><div class="fn" /><b><a href="qmessagebox.html#setIconPixmap">setIconPixmap</a></b> (<i>self</i>, QPixmap)</li><li><div class="fn" /><b><a href="qmessagebox.html#setInformativeText">setInformativeText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setStandardButtons">setStandardButtons</a></b> (<i>self</i>, StandardButtons)</li><li><div class="fn" /><b><a href="qmessagebox.html#setText">setText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setTextFormat">setTextFormat</a></b> (<i>self</i>, Qt.TextFormat)</li><li><div class="fn" /><b><a href="qmessagebox.html#setWindowModality">setWindowModality</a></b> (<i>self</i>, Qt.WindowModality)</li><li><div class="fn" /><b><a href="qmessagebox.html#setWindowTitle">setWindowTitle</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent)</li><li><div class="fn" />QSize <b><a href="qmessagebox.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#standardButton">standardButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" />StandardButtons <b><a href="qmessagebox.html#standardButtons">standardButtons</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.TextFormat <b><a href="qmessagebox.html#textFormat">textFormat</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" /><b><a href="qmessagebox.html#about">about</a></b> (QWidget, QString, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#aboutQt">aboutQt</a></b> (QWidget, QString&#160;<i>title</i>&#160;=&#160;QString())</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#critical">critical</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#critical-2">critical</a></b> (QWidget, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#critical-3">critical</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#information">information</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#information-2">information</a></b> (QWidget, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#information-3">information</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#question">question</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#question-2">question</a></b> (QWidget, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#question-3">question</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />QPixmap <b><a href="qmessagebox.html#standardIcon">standardIcon</a></b> (Icon)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#warning">warning</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#warning-2">warning</a></b> (QWidget, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#warning-3">warning</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmessagebox.html#buttonClicked">buttonClicked</a></b> (QAbstractButton *)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.</p>
11
 
<p>A message box displays a primary <a href="qmessagebox.html#text-prop">text</a> to alert the user to a situation, an <a href="qmessagebox.html#informativeText-prop">informative text</a> to further explain the alert or to ask the user a question, and an optional <a href="qmessagebox.html#detailedText-prop">detailed text</a> to provide even more data if the user requests it. A message box can also display an <a href="qmessagebox.html#icon-prop">icon</a> and <a href="qmessagebox.html#standardButtons-prop">standard buttons</a> for accepting a user response.</p>
12
 
<p>Two APIs for using QMessageBox are provided, the property-based API, and the static functions. Calling one of the static functions is the simpler approach, but it is less flexible than using the property-based API, and the result is less informative. Using the property-based API is recommended.</p>
13
 
<a name="the-property-based-api" />
 
9
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMessageBox Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMessageBox class provides a modal dialog for informing the
 
10
user or for asking the user a question and receiving an answer.
 
11
<a href="#details">More...</a></p>
 
12
 
 
13
<p>Inherits <a href="qdialog.html">QDialog</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a></b> { InvalidRole, AcceptRole, RejectRole, DestructiveRole, ..., ApplyRole }</li><li><div class="fn" />enum <b><a href="qmessagebox.html#Icon-enum">Icon</a></b> { NoIcon, Information, Warning, Critical, Question }</li><li><div class="fn" />enum <b><a href="qmessagebox.html#StandardButton-enum">StandardButton</a></b> { NoButton, Ok, Save, SaveAll, ..., ButtonMask }</li><li><div class="fn" />class <b><a href="qmessagebox-standardbuttons.html">StandardButtons</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox-2">__init__</a></b> (<i>self</i>, Icon, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.NoButton, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</li><li><div class="fn" /><b><a href="qmessagebox.html#QMessageBox-3">__init__</a></b> (<i>self</i>, QString, QString, Icon, int, int, int, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</li><li><div class="fn" /><b><a href="qmessagebox.html#addButton">addButton</a></b> (<i>self</i>, QAbstractButton, ButtonRole)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#addButton-2">addButton</a></b> (<i>self</i>, QString, ButtonRole)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#addButton-3">addButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#button">button</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" />ButtonRole <b><a href="qmessagebox.html#buttonRole">buttonRole</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" />list-of-QAbstractButton <b><a href="qmessagebox.html#buttons">buttons</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#buttonText">buttonText</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qmessagebox.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#clickedButton">clickedButton</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#closeEvent">closeEvent</a></b> (<i>self</i>, QCloseEvent)</li><li><div class="fn" />QPushButton <b><a href="qmessagebox.html#defaultButton">defaultButton</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#detailedText">detailedText</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractButton <b><a href="qmessagebox.html#escapeButton">escapeButton</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmessagebox.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />Icon <b><a href="qmessagebox.html#icon">icon</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qmessagebox.html#iconPixmap">iconPixmap</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#informativeText">informativeText</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" /><b><a href="qmessagebox.html#open">open</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmessagebox.html#open-2">open</a></b> (<i>self</i>, QObject, SLOT()SLOT())</li><li><div class="fn" /><b><a href="qmessagebox.html#open-3">open</a></b> (<i>self</i>, callable)</li><li><div class="fn" /><b><a href="qmessagebox.html#removeButton">removeButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" /><b><a href="qmessagebox.html#setButtonText">setButtonText</a></b> (<i>self</i>, int, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDefaultButton">setDefaultButton</a></b> (<i>self</i>, QPushButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDefaultButton-2">setDefaultButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setDetailedText">setDetailedText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setEscapeButton">setEscapeButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setEscapeButton-2">setEscapeButton</a></b> (<i>self</i>, StandardButton)</li><li><div class="fn" /><b><a href="qmessagebox.html#setIcon">setIcon</a></b> (<i>self</i>, Icon)</li><li><div class="fn" /><b><a href="qmessagebox.html#setIconPixmap">setIconPixmap</a></b> (<i>self</i>, QPixmap)</li><li><div class="fn" /><b><a href="qmessagebox.html#setInformativeText">setInformativeText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setStandardButtons">setStandardButtons</a></b> (<i>self</i>, StandardButtons)</li><li><div class="fn" /><b><a href="qmessagebox.html#setText">setText</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#setTextFormat">setTextFormat</a></b> (<i>self</i>, Qt.TextFormat)</li><li><div class="fn" /><b><a href="qmessagebox.html#setWindowModality">setWindowModality</a></b> (<i>self</i>, Qt.WindowModality)</li><li><div class="fn" /><b><a href="qmessagebox.html#setWindowTitle">setWindowTitle</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent)</li><li><div class="fn" />QSize <b><a href="qmessagebox.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#standardButton">standardButton</a></b> (<i>self</i>, QAbstractButton)</li><li><div class="fn" />StandardButtons <b><a href="qmessagebox.html#standardButtons">standardButtons</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmessagebox.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.TextFormat <b><a href="qmessagebox.html#textFormat">textFormat</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" /><b><a href="qmessagebox.html#about">about</a></b> (QWidget, QString, QString)</li><li><div class="fn" /><b><a href="qmessagebox.html#aboutQt">aboutQt</a></b> (QWidget, QString&#160;<i>title</i>&#160;=&#160;QString())</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#critical">critical</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#critical-2">critical</a></b> (QWidget, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#critical-3">critical</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#information">information</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#information-2">information</a></b> (QWidget, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#information-3">information</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#question">question</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#question-2">question</a></b> (QWidget, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#question-3">question</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li><li><div class="fn" />QPixmap <b><a href="qmessagebox.html#standardIcon">standardIcon</a></b> (Icon)</li><li><div class="fn" />StandardButton <b><a href="qmessagebox.html#warning">warning</a></b> (QWidget, QString, QString, StandardButtons&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, StandardButton&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</li><li><div class="fn" />int <b><a href="qmessagebox.html#warning-2">warning</a></b> (QWidget, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qmessagebox.html#warning-3">warning</a></b> (QWidget, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmessagebox.html#buttonClicked">buttonClicked</a></b> (QAbstractButton *)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMessageBox class provides a modal dialog for informing the
 
14
user or for asking the user a question and receiving an answer.</p>
 
15
<p>A message box displays a primary <a href="qmessagebox.html#text-prop">text</a> to alert the user to a
 
16
situation, an <a href="qmessagebox.html#informativeText-prop">informative text</a> to
 
17
further explain the alert or to ask the user a question, and an
 
18
optional <a href="qmessagebox.html#detailedText-prop">detailed
 
19
text</a> to provide even more data if the user requests it. A
 
20
message box can also display an <a href="qmessagebox.html#icon-prop">icon</a> and <a href="qmessagebox.html#standardButtons-prop">standard buttons</a> for
 
21
accepting a user response.</p>
 
22
<p>Two APIs for using QMessageBox are provided, the property-based
 
23
API, and the static functions. Calling one of the static functions
 
24
is the simpler approach, but it is less flexible than using the
 
25
property-based API, and the result is less informative. Using the
 
26
property-based API is recommended.</p>
 
27
<a id="the-property-based-api" name="the-property-based-api" />
14
28
<h3>The Property-based API</h3>
15
 
<p>To use the property-based API, construct an instance of QMessageBox, set the desired properties, and call <a href="qmessagebox.html#exec">exec_</a>() to show the message. The simplest configuration is to set only the <a href="qmessagebox.html#text-prop">message text</a> property.</p>
16
 
<pre> QMessageBox msgBox;
 
29
<p>To use the property-based API, construct an instance of
 
30
QMessageBox, set the desired properties, and call <a href="qmessagebox.html#exec">exec_</a>() to show the message. The
 
31
simplest configuration is to set only the <a href="qmessagebox.html#text-prop">message text</a> property.</p>
 
32
<pre class="highlightedCode brush: cpp">
 
33
 QMessageBox msgBox;
17
34
 msgBox.setText("The document has been modified.");
18
 
 msgBox.exec();</pre>
19
 
<p>The user must click the <b>OK</b> button to dismiss the message box. The rest of the GUI is blocked until the message box is dismissed.</p>
20
 
<p align="center"><img src="images/msgbox1.png" /></p><p>A better approach than just alerting the user to an event is to also ask the user what to do about it. Store the question in the <a href="qmessagebox.html#informativeText-prop">informative text</a> property, and set the <a href="qmessagebox.html#standardButtons-prop">standard buttons</a> property to the set of buttons you want as the set of user responses. The buttons are specified by combining values from <a href="qmessagebox.html#StandardButton-enum">StandardButtons</a> using the bitwise OR operator. The display order for the buttons is platform-dependent. For example, on Windows, <b>Save</b> is displayed to the left of <b>Cancel</b>, whereas on Mac OS, the order is reversed.</p>
 
35
 msgBox.exec();
 
36
</pre>
 
37
<p>The user must click the <b>OK</b> button to dismiss the message
 
38
box. The rest of the GUI is blocked until the message box is
 
39
dismissed.</p>
 
40
<p class="centerAlign"><img src="images/msgbox1.png" /></p>
 
41
<p>A better approach than just alerting the user to an event is to
 
42
also ask the user what to do about it. Store the question in the
 
43
<a href="qmessagebox.html#informativeText-prop">informative
 
44
text</a> property, and set the <a href="qmessagebox.html#standardButtons-prop">standard buttons</a>
 
45
property to the set of buttons you want as the set of user
 
46
responses. The buttons are specified by combining values from
 
47
<a href="qmessagebox.html#StandardButton-enum">StandardButtons</a>
 
48
using the bitwise OR operator. The display order for the buttons is
 
49
platform-dependent. For example, on Windows, <b>Save</b> is
 
50
displayed to the left of <b>Cancel</b>, whereas on Mac OS, the
 
51
order is reversed.</p>
21
52
<p>Mark one of your standard buttons to be your <a href="qmessagebox.html#defaultButton">default button</a>.</p>
22
 
<pre> QMessageBox msgBox;
 
53
<pre class="highlightedCode brush: cpp">
 
54
 QMessageBox msgBox;
23
55
 msgBox.setText("The document has been modified.");
24
56
 msgBox.setInformativeText("Do you want to save your changes?");
25
57
 msgBox.setStandardButtons(QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel);
26
58
 msgBox.setDefaultButton(QMessageBox.Save);
27
 
 int ret = msgBox.exec();</pre>
28
 
<p>This is the approach recommended in the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/chapter_18_section_7.html">Mac OS X Guidlines</a>. Similar guidlines apply for the other platforms, but note the different ways the <a href="qmessagebox.html#informativeText-prop">informative text</a> is handled for different platforms.</p>
29
 
<p align="center"><img src="images/msgbox2.png" /></p><p>The <a href="qmessagebox.html#exec">exec_</a>() slot returns the <a href="qmessagebox.html#StandardButton-enum">StandardButtons</a> value of the button that was clicked.</p>
30
 
<pre> switch (ret) {
 
59
 int ret = msgBox.exec();
 
60
</pre>
 
61
<p>This is the approach recommended in the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/chapter_18_section_7.html">
 
62
Mac OS X Guidlines</a>. Similar guidlines apply for the other
 
63
platforms, but note the different ways the <a href="qmessagebox.html#informativeText-prop">informative text</a> is
 
64
handled for different platforms.</p>
 
65
<p class="centerAlign"><img src="images/msgbox2.png" /></p>
 
66
<p>The <a href="qmessagebox.html#exec">exec_</a>() slot returns the
 
67
<a href="qmessagebox.html#StandardButton-enum">StandardButtons</a>
 
68
value of the button that was clicked.</p>
 
69
<pre class="highlightedCode brush: cpp">
 
70
 switch (ret) {
31
71
   case QMessageBox.Save:
32
72
       <span class="comment">// Save was clicked</span>
33
73
       break;
40
80
   default:
41
81
       <span class="comment">// should never be reached</span>
42
82
       break;
43
 
 }</pre>
44
 
<p>To give the user more information to help him answer the question, set the <a href="qmessagebox.html#detailedText-prop">detailed text</a> property. If the <a href="qmessagebox.html#detailedText-prop">detailed text</a> property is set, the <b>Show Details...</b> button will be shown.</p>
45
 
<p align="center"><img src="images/msgbox3.png" /></p><p>Clicking the <b>Show Details...</b> button displays the detailed text.</p>
46
 
<p align="center"><img src="images/msgbox4.png" /></p><a name="rich-text-and-the-text-format-property" />
 
83
 }
 
84
</pre>
 
85
<p>To give the user more information to help him answer the
 
86
question, set the <a href="qmessagebox.html#detailedText-prop">detailed text</a> property. If
 
87
the <a href="qmessagebox.html#detailedText-prop">detailed text</a>
 
88
property is set, the <b>Show Details...</b> button will be
 
89
shown.</p>
 
90
<p class="centerAlign"><img src="images/msgbox3.png" /></p>
 
91
<p>Clicking the <b>Show Details...</b> button displays the detailed
 
92
text.</p>
 
93
<p class="centerAlign"><img src="images/msgbox4.png" /></p>
 
94
<a id="rich-text-and-the-text-format-property" name="rich-text-and-the-text-format-property" />
47
95
<h4>Rich Text and the Text Format Property</h4>
48
 
<p>The <a href="qmessagebox.html#detailedText-prop">detailed text</a> property is always interpreted as plain text. The <a href="qmessagebox.html#text-prop">main text</a> and <a href="qmessagebox.html#informativeText-prop">informative text</a> properties can be either plain text or rich text. These strings are interpreted according to the setting of the <a href="qmessagebox.html#textFormat-prop">text format</a> property. The default setting is <a href="qt.html#TextFormat-enum">auto-text</a>.</p>
49
 
<p>Note that for some plain text strings containing XML meta-characters, the auto-text <a href="qt.html#mightBeRichText">rich text detection test</a> may fail causing your plain text string to be interpreted incorrectly as rich text. In these rare cases, use <a href="qt.html#convertFromPlainText">Qt.convertFromPlainText</a>() to convert your plain text string to a visually equivalent rich text string, or set the <a href="qmessagebox.html#textFormat-prop">text format</a> property explicitly with <a href="qmessagebox.html#textFormat-prop">setTextFormat</a>().</p>
50
 
<a name="severity-levels-and-the-icon-and-pixmap-properties" />
 
96
<p>The <a href="qmessagebox.html#detailedText-prop">detailed
 
97
text</a> property is always interpreted as plain text. The <a href="qmessagebox.html#text-prop">main text</a> and <a href="qmessagebox.html#informativeText-prop">informative text</a>
 
98
properties can be either plain text or rich text. These strings are
 
99
interpreted according to the setting of the <a href="qmessagebox.html#textFormat-prop">text format</a> property. The
 
100
default setting is <a href="qt.html#TextFormat-enum">auto-text</a>.</p>
 
101
<p>Note that for some plain text strings containing XML
 
102
meta-characters, the auto-text <a href="qt.html#mightBeRichText">rich text detection test</a> may fail
 
103
causing your plain text string to be interpreted incorrectly as
 
104
rich text. In these rare cases, use <a href="qt.html#convertFromPlainText">Qt.convertFromPlainText</a>() to
 
105
convert your plain text string to a visually equivalent rich text
 
106
string, or set the <a href="qmessagebox.html#textFormat-prop">text
 
107
format</a> property explicitly with <a href="qmessagebox.html#textFormat-prop">setTextFormat</a>().</p>
 
108
<a id="severity-levels-and-the-icon-and-pixmap-properties" name="severity-levels-and-the-icon-and-pixmap-properties" />
51
109
<h4>Severity Levels and the Icon and Pixmap Properties</h4>
52
 
<p>QMessageBox supports four predefined message severity levels, or message types, which really only differ in the predefined icon they each show. Specify one of the four predefined message types by setting the <a href="qmessagebox.html#icon-prop">icon</a> property to one of the <a href="qmessagebox.html#Icon-enum">predefined icons</a>. The following rules are guidelines:</p>
53
 
<p><table align="center" border="0" cellpadding="2" cellspacing="1" class="generic">
54
 
<tr class="odd" valign="top"><td><p align="center"><img src="images/qmessagebox-quest.png" /></p></td><td><a href="qmessagebox.html#Icon-enum">Question</a></td><td>For asking a question during normal operations.</td></tr>
55
 
<tr class="even" valign="top"><td><p align="center"><img src="images/qmessagebox-info.png" /></p></td><td><a href="qmessagebox.html#Icon-enum">Information</a></td><td>For reporting information about normal operations.</td></tr>
56
 
<tr class="odd" valign="top"><td><p align="center"><img src="images/qmessagebox-warn.png" /></p></td><td><a href="qmessagebox.html#Icon-enum">Warning</a></td><td>For reporting non-critical errors.</td></tr>
57
 
<tr class="even" valign="top"><td><p align="center"><img src="images/qmessagebox-crit.png" /></p></td><td><a href="qmessagebox.html#Icon-enum">Critical</a></td><td>For reporting critical errors.</td></tr>
58
 
</table></p>
59
 
<p><a href="qmessagebox.html#Icon-enum">Predefined icons</a> are not defined by QMessageBox, but provided by the style. The default value is <a href="qmessagebox.html#Icon-enum">No Icon</a>. The message boxes are otherwise the same for all cases. When using a standard icon, use the one recommended in the table, or use the one recommended by the style guidelines for your platform. If none of the standard icons is right for your message box, you can use a custom icon by setting the <a href="qmessagebox.html#iconPixmap-prop">icon pixmap</a> property instead of setting the <a href="qmessagebox.html#icon-prop">icon</a> property.</p>
60
 
<p>In summary, to set an icon, use <i>either</i> <a href="qmessagebox.html#icon-prop">setIcon</a>() for one of the standard icons, <i>or</i> <a href="qmessagebox.html#iconPixmap-prop">setIconPixmap</a>() for a custom icon.</p>
61
 
<a name="the-static-functions-api" />
 
110
<p>QMessageBox supports four predefined message severity levels, or
 
111
message types, which really only differ in the predefined icon they
 
112
each show. Specify one of the four predefined message types by
 
113
setting the <a href="qmessagebox.html#icon-prop">icon</a> property
 
114
to one of the <a href="qmessagebox.html#Icon-enum">predefined
 
115
icons</a>. The following rules are guidelines:</p>
 
116
<table class="generic">
 
117
<tr class="odd topAlign">
 
118
<td>
 
119
<p class="centerAlign"><img src="images/qmessagebox-quest.png" /></p>
 
120
</td>
 
121
<td>
 
122
<p><a href="qmessagebox.html#Icon-enum">Question</a></p>
 
123
</td>
 
124
<td>
 
125
<p>For asking a question during normal operations.</p>
 
126
</td>
 
127
</tr>
 
128
<tr class="even topAlign">
 
129
<td>
 
130
<p class="centerAlign"><img src="images/qmessagebox-info.png" /></p>
 
131
</td>
 
132
<td>
 
133
<p><a href="qmessagebox.html#Icon-enum">Information</a></p>
 
134
</td>
 
135
<td>
 
136
<p>For reporting information about normal operations.</p>
 
137
</td>
 
138
</tr>
 
139
<tr class="odd topAlign">
 
140
<td>
 
141
<p class="centerAlign"><img src="images/qmessagebox-warn.png" /></p>
 
142
</td>
 
143
<td>
 
144
<p><a href="qmessagebox.html#Icon-enum">Warning</a></p>
 
145
</td>
 
146
<td>
 
147
<p>For reporting non-critical errors.</p>
 
148
</td>
 
149
</tr>
 
150
<tr class="even topAlign">
 
151
<td>
 
152
<p class="centerAlign"><img src="images/qmessagebox-crit.png" /></p>
 
153
</td>
 
154
<td>
 
155
<p><a href="qmessagebox.html#Icon-enum">Critical</a></p>
 
156
</td>
 
157
<td>
 
158
<p>For reporting critical errors.</p>
 
159
</td>
 
160
</tr>
 
161
</table>
 
162
<p><a href="qmessagebox.html#Icon-enum">Predefined icons</a> are
 
163
not defined by QMessageBox, but provided by the style. The default
 
164
value is <a href="qmessagebox.html#Icon-enum">No Icon</a>. The
 
165
message boxes are otherwise the same for all cases. When using a
 
166
standard icon, use the one recommended in the table, or use the one
 
167
recommended by the style guidelines for your platform. If none of
 
168
the standard icons is right for your message box, you can use a
 
169
custom icon by setting the <a href="qmessagebox.html#iconPixmap-prop">icon pixmap</a> property instead
 
170
of setting the <a href="qmessagebox.html#icon-prop">icon</a>
 
171
property.</p>
 
172
<p>In summary, to set an icon, use <i>either</i> <a href="qmessagebox.html#icon-prop">setIcon</a>() for one of the standard
 
173
icons, <i>or</i> <a href="qmessagebox.html#iconPixmap-prop">setIconPixmap</a>() for a custom
 
174
icon.</p>
 
175
<a id="the-static-functions-api" name="the-static-functions-api" />
62
176
<h3>The Static Functions API</h3>
63
 
<p>Building message boxes with the static functions API, although convenient, is less flexible than using the property-based API, because the static function signatures lack parameters for setting the <a href="qmessagebox.html#informativeText-prop">informative text</a> and <a href="qmessagebox.html#detailedText-prop">detailed text</a> properties. One work-around for this has been to use the <tt>title</tt> parameter as the message box main text and the <tt>text</tt> parameter as the message box informative text. Because this has the obvious drawback of making a less readable message box, platform guidelines do not recommend it. The <i>Microsoft Windows User Interface Guidelines</i> recommend using the <a href="qcoreapplication.html#applicationName-prop">application name</a> as the <a href="qmessagebox.html#setWindowTitle">window's title</a>, which means that if you have an informative text in addition to your main text, you must concatenate it to the <tt>text</tt> parameter.</p>
64
 
<p>Note that the static function signatures have changed with respect to their button parameters, which are now used to set the <a href="qmessagebox.html#standardButtons-prop">standard buttons</a> and the <a href="qmessagebox.html#defaultButton">default button</a>.</p>
 
177
<p>Building message boxes with the static functions API, although
 
178
convenient, is less flexible than using the property-based API,
 
179
because the static function signatures lack parameters for setting
 
180
the <a href="qmessagebox.html#informativeText-prop">informative
 
181
text</a> and <a href="qmessagebox.html#detailedText-prop">detailed
 
182
text</a> properties. One work-around for this has been to use the
 
183
<tt>title</tt> parameter as the message box main text and the
 
184
<tt>text</tt> parameter as the message box informative text.
 
185
Because this has the obvious drawback of making a less readable
 
186
message box, platform guidelines do not recommend it. The
 
187
<i>Microsoft Windows User Interface Guidelines</i> recommend using
 
188
the <a href="qcoreapplication.html#applicationName-prop">application name</a>
 
189
as the <a href="qmessagebox.html#setWindowTitle">window's
 
190
title</a>, which means that if you have an informative text in
 
191
addition to your main text, you must concatenate it to the
 
192
<tt>text</tt> parameter.</p>
 
193
<p>Note that the static function signatures have changed with
 
194
respect to their button parameters, which are now used to set the
 
195
<a href="qmessagebox.html#standardButtons-prop">standard
 
196
buttons</a> and the <a href="qmessagebox.html#defaultButton">default button</a>.</p>
65
197
<p>Static functions are available for creating <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#question">question</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>() message boxes.</p>
66
 
<pre> int ret = QMessageBox.warning(this, tr("My Application"),
 
198
<pre class="highlightedCode brush: cpp">
 
199
 int ret = QMessageBox.warning(this, tr("My Application"),
67
200
                                tr("The document has been modified.\n"
68
201
                                   "Do you want to save your changes?"),
69
202
                                QMessageBox.Save | QMessageBox.Discard
70
203
                                | QMessageBox.Cancel,
71
 
                                QMessageBox.Save);</pre>
72
 
<p>The <a href="dialogs-standarddialogs.html">Standard Dialogs</a> example shows how to use QMessageBox and the other built-in Qt dialogs.</p>
73
 
<a name="advanced-usage" />
 
204
                                QMessageBox.Save);
 
205
</pre>
 
206
<p>The <a href="dialogs-standarddialogs.html">Standard Dialogs</a>
 
207
example shows how to use QMessageBox and the other built-in Qt
 
208
dialogs.</p>
 
209
<a id="advanced-usage" name="advanced-usage" />
74
210
<h3>Advanced Usage</h3>
75
 
<p>If the <a href="qmessagebox.html#StandardButton-enum">standard buttons</a> are not flexible enough for your message box, you can use the <a href="qmessagebox.html#addButton">addButton</a>() overload that takes a text and a ButtonRoleto to add custom buttons. The <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a> is used by QMessageBox to determine the ordering of the buttons on screen (which varies according to the platform). You can test the value of <a href="qmessagebox.html#clickedButton">clickedButton</a>() after calling <a href="qmessagebox.html#exec">exec_</a>(). For example,</p>
76
 
<pre> QMessageBox msgBox;
 
211
<p>If the <a href="qmessagebox.html#StandardButton-enum">standard
 
212
buttons</a> are not flexible enough for your message box, you can
 
213
use the <a href="qmessagebox.html#addButton">addButton</a>()
 
214
overload that takes a text and a ButtonRoleto to add custom
 
215
buttons. The <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a> is used by
 
216
QMessageBox to determine the ordering of the buttons on screen
 
217
(which varies according to the platform). You can test the value of
 
218
<a href="qmessagebox.html#clickedButton">clickedButton</a>() after
 
219
calling <a href="qmessagebox.html#exec">exec_</a>(). For
 
220
example,</p>
 
221
<pre class="highlightedCode brush: cpp">
 
222
 QMessageBox msgBox;
77
223
 QPushButton *connectButton = msgBox.addButton(tr("Connect"), QMessageBox.ActionRole);
78
224
 QPushButton *abortButton = msgBox.addButton(QMessageBox.Abort);
79
225
 
83
229
     <span class="comment">// connect</span>
84
230
 } else if (msgBox.clickedButton() == abortButton) {
85
231
     <span class="comment">// abort</span>
86
 
 }</pre>
87
 
<a name="default-and-escape-keys" />
 
232
 }
 
233
</pre>
 
234
<a id="default-and-escape-keys" name="default-and-escape-keys" />
88
235
<h3>Default and Escape Keys</h3>
89
 
<p>The default button (i.e., the button activated when <b>Enter</b> is pressed) can be specified using <a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>(). If a default button is not specified, QMessageBox tries to find one based on the <a href="qmessagebox.html#ButtonRole-enum">button roles</a> of the buttons used in the message box.</p>
90
 
<p>The escape button (the button activated when <b>Esc</b> is pressed) can be specified using <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>(). If an escape button is not specified, QMessageBox tries to find one using these rules:</p>
 
236
<p>The default button (i.e., the button activated when <b>Enter</b>
 
237
is pressed) can be specified using <a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>(). If a
 
238
default button is not specified, QMessageBox tries to find one
 
239
based on the <a href="qmessagebox.html#ButtonRole-enum">button
 
240
roles</a> of the buttons used in the message box.</p>
 
241
<p>The escape button (the button activated when <b>Esc</b> is
 
242
pressed) can be specified using <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>(). If an
 
243
escape button is not specified, QMessageBox tries to find one using
 
244
these rules:</p>
91
245
<ol type="1">
92
 
<li>If there is only one button, it is the button activated when <b>Esc</b> is pressed.</li>
93
 
<li>If there is a <a href="qmessagebox.html#StandardButton-enum">Cancel</a> button, it is the button activated when <b>Esc</b> is pressed.</li>
94
 
<li>If there is exactly one button having either <a href="qmessagebox.html#ButtonRole-enum">the Reject role</a> or the <a href="qmessagebox.html#ButtonRole-enum">the No role</a>, it is the button activated when <b>Esc</b> is pressed.</li>
 
246
<li>If there is only one button, it is the button activated when
 
247
<b>Esc</b> is pressed.</li>
 
248
<li>If there is a <a href="qmessagebox.html#StandardButton-enum">Cancel</a> button, it is the
 
249
button activated when <b>Esc</b> is pressed.</li>
 
250
<li>If there is exactly one button having either <a href="qmessagebox.html#ButtonRole-enum">the Reject role</a> or the
 
251
<a href="qmessagebox.html#ButtonRole-enum">the No role</a>, it is
 
252
the button activated when <b>Esc</b> is pressed.</li>
95
253
</ol>
96
 
<p>When an escape button can't be determined using these rules, pressing <b>Esc</b> has no effect.</p>
97
 
<p>See also <a href="qdialogbuttonbox.html">QDialogButtonBox</a>, <a href="guibooks.html#fowler">GUI Design Handbook: Message Box</a>, <a href="dialogs-standarddialogs.html">Standard Dialogs Example</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
98
 
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ButtonRole-enum" />QMessageBox.ButtonRole</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>
99
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
100
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
101
 
<tr><td valign="top"><tt>QMessageBox.InvalidRole</tt></td><td align="center" valign="top"><tt>-1</tt></td><td valign="top">The button is invalid.</td></tr>
102
 
<tr><td valign="top"><tt>QMessageBox.AcceptRole</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Clicking the button causes the dialog to be accepted (e.g. OK).</td></tr>
103
 
<tr><td valign="top"><tt>QMessageBox.RejectRole</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Clicking the button causes the dialog to be rejected (e.g. Cancel).</td></tr>
104
 
<tr><td valign="top"><tt>QMessageBox.DestructiveRole</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Clicking the button causes a destructive change (e.g. for Discarding Changes) and closes the dialog.</td></tr>
105
 
<tr><td valign="top"><tt>QMessageBox.ActionRole</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Clicking the button causes changes to the elements within the dialog.</td></tr>
106
 
<tr><td valign="top"><tt>QMessageBox.HelpRole</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The button can be clicked to request help.</td></tr>
107
 
<tr><td valign="top"><tt>QMessageBox.YesRole</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The button is a "Yes"-like button.</td></tr>
108
 
<tr><td valign="top"><tt>QMessageBox.NoRole</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">The button is a "No"-like button.</td></tr>
109
 
<tr><td valign="top"><tt>QMessageBox.ApplyRole</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">The button applies current changes.</td></tr>
110
 
<tr><td valign="top"><tt>QMessageBox.ResetRole</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">The button resets the dialog's fields to default values.</td></tr>
111
 
</table></p>
 
254
<p>When an escape button can't be determined using these rules,
 
255
pressing <b>Esc</b> has no effect.</p>
 
256
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ButtonRole-enum" />QMessageBox.ButtonRole</h3><p>This enum describes the roles that can be used to describe
 
257
buttons in the button box. Combinations of these roles are as flags
 
258
used to describe different aspects of their behavior.</p>
 
259
<table class="valuelist">
 
260
<tr class="odd">
 
261
<td />
 
262
</tr>
 
263
<tr>
 
264
<th class="tblConst">Constant</th>
 
265
<th class="tblval">Value</th>
 
266
<th class="tbldscr">Description</th>
 
267
</tr>
 
268
<tr>
 
269
<td class="topAlign"><tt>QMessageBox.InvalidRole</tt></td>
 
270
<td class=" topAlign"><tt>-1</tt></td>
 
271
<td class="topAlign">The button is invalid.</td>
 
272
</tr>
 
273
<tr>
 
274
<td class="topAlign"><tt>QMessageBox.AcceptRole</tt></td>
 
275
<td class=" topAlign"><tt>0</tt></td>
 
276
<td class="topAlign">Clicking the button causes the dialog to be
 
277
accepted (e.g. OK).</td>
 
278
</tr>
 
279
<tr>
 
280
<td class="topAlign"><tt>QMessageBox.RejectRole</tt></td>
 
281
<td class=" topAlign"><tt>1</tt></td>
 
282
<td class="topAlign">Clicking the button causes the dialog to be
 
283
rejected (e.g. Cancel).</td>
 
284
</tr>
 
285
<tr>
 
286
<td class="topAlign"><tt>QMessageBox.DestructiveRole</tt></td>
 
287
<td class=" topAlign"><tt>2</tt></td>
 
288
<td class="topAlign">Clicking the button causes a destructive
 
289
change (e.g. for Discarding Changes) and closes the dialog.</td>
 
290
</tr>
 
291
<tr>
 
292
<td class="topAlign"><tt>QMessageBox.ActionRole</tt></td>
 
293
<td class=" topAlign"><tt>3</tt></td>
 
294
<td class="topAlign">Clicking the button causes changes to the
 
295
elements within the dialog.</td>
 
296
</tr>
 
297
<tr>
 
298
<td class="topAlign"><tt>QMessageBox.HelpRole</tt></td>
 
299
<td class=" topAlign"><tt>4</tt></td>
 
300
<td class="topAlign">The button can be clicked to request
 
301
help.</td>
 
302
</tr>
 
303
<tr>
 
304
<td class="topAlign"><tt>QMessageBox.YesRole</tt></td>
 
305
<td class=" topAlign"><tt>5</tt></td>
 
306
<td class="topAlign">The button is a "Yes"-like button.</td>
 
307
</tr>
 
308
<tr>
 
309
<td class="topAlign"><tt>QMessageBox.NoRole</tt></td>
 
310
<td class=" topAlign"><tt>6</tt></td>
 
311
<td class="topAlign">The button is a "No"-like button.</td>
 
312
</tr>
 
313
<tr>
 
314
<td class="topAlign"><tt>QMessageBox.ApplyRole</tt></td>
 
315
<td class=" topAlign"><tt>8</tt></td>
 
316
<td class="topAlign">The button applies current changes.</td>
 
317
</tr>
 
318
<tr>
 
319
<td class="topAlign"><tt>QMessageBox.ResetRole</tt></td>
 
320
<td class=" topAlign"><tt>7</tt></td>
 
321
<td class="topAlign">The button resets the dialog's fields to
 
322
default values.</td>
 
323
</tr>
 
324
</table>
112
325
<p>See also <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>.</p>
113
 
<a name="//apple_ref/cpp/tag/QMessageBox/Icon" />
114
 
<a name="//apple_ref/cpp/econst/QMessageBox/NoIcon" />
115
 
<a name="//apple_ref/cpp/econst/QMessageBox/Question" />
116
 
<a name="//apple_ref/cpp/econst/QMessageBox/Information" />
117
 
<a name="//apple_ref/cpp/econst/QMessageBox/Warning" />
118
 
<a name="//apple_ref/cpp/econst/QMessageBox/Critical" />
 
326
 
 
327
 
119
328
<h3 class="fn"><a name="Icon-enum" />QMessageBox.Icon</h3><p>This enum has the following values:</p>
120
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
121
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
122
 
<tr><td valign="top"><tt>QMessageBox.NoIcon</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">the message box does not have any icon.</td></tr>
123
 
<tr><td valign="top"><tt>QMessageBox.Question</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">an icon indicating that the message is asking a question.</td></tr>
124
 
<tr><td valign="top"><tt>QMessageBox.Information</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">an icon indicating that the message is nothing out of the ordinary.</td></tr>
125
 
<tr><td valign="top"><tt>QMessageBox.Warning</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">an icon indicating that the message is a warning, but can be dealt with.</td></tr>
126
 
<tr><td valign="top"><tt>QMessageBox.Critical</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">an icon indicating that the message represents a critical problem.</td></tr>
127
 
</table></p>
128
 
<a name="//apple_ref/cpp/tag/QMessageBox/StandardButton" />
129
 
<a name="//apple_ref/cpp/econst/QMessageBox/Ok" />
130
 
<a name="//apple_ref/cpp/econst/QMessageBox/Open" />
131
 
<a name="//apple_ref/cpp/econst/QMessageBox/Save" />
132
 
<a name="//apple_ref/cpp/econst/QMessageBox/Cancel" />
133
 
<a name="//apple_ref/cpp/econst/QMessageBox/Close" />
134
 
<a name="//apple_ref/cpp/econst/QMessageBox/Discard" />
135
 
<a name="//apple_ref/cpp/econst/QMessageBox/Apply" />
136
 
<a name="//apple_ref/cpp/econst/QMessageBox/Reset" />
137
 
<a name="//apple_ref/cpp/econst/QMessageBox/RestoreDefaults" />
138
 
<a name="//apple_ref/cpp/econst/QMessageBox/Help" />
139
 
<a name="//apple_ref/cpp/econst/QMessageBox/SaveAll" />
140
 
<a name="//apple_ref/cpp/econst/QMessageBox/Yes" />
141
 
<a name="//apple_ref/cpp/econst/QMessageBox/YesToAll" />
142
 
<a name="//apple_ref/cpp/econst/QMessageBox/No" />
143
 
<a name="//apple_ref/cpp/econst/QMessageBox/NoToAll" />
144
 
<a name="//apple_ref/cpp/econst/QMessageBox/Abort" />
145
 
<a name="//apple_ref/cpp/econst/QMessageBox/Retry" />
146
 
<a name="//apple_ref/cpp/econst/QMessageBox/Ignore" />
147
 
<a name="//apple_ref/cpp/econst/QMessageBox/NoButton" />
148
 
<a name="//apple_ref/cpp/econst/QMessageBox/FirstButton" />
149
 
<a name="//apple_ref/cpp/econst/QMessageBox/LastButton" />
150
 
<a name="//apple_ref/cpp/econst/QMessageBox/YesAll" />
151
 
<a name="//apple_ref/cpp/econst/QMessageBox/NoAll" />
152
 
<a name="//apple_ref/cpp/econst/QMessageBox/Default" />
153
 
<a name="//apple_ref/cpp/econst/QMessageBox/Escape" />
154
 
<a name="//apple_ref/cpp/econst/QMessageBox/FlagMask" />
155
 
<a name="//apple_ref/cpp/econst/QMessageBox/ButtonMask" />
156
 
<a name="//apple_ref/cpp/tdef/QMessageBox/StandardButtons" />
157
 
<h3 class="fn"><a name="StandardButton-enum" />QMessageBox.StandardButton</h3><p>These enums describe flags for standard buttons. Each button has a defined <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a>.</p>
158
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
159
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
160
 
<tr><td valign="top"><tt>QMessageBox.Ok</tt></td><td align="center" valign="top"><tt>0x00000400</tt></td><td valign="top">An "OK" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
161
 
<tr><td valign="top"><tt>QMessageBox.Open</tt></td><td align="center" valign="top"><tt>0x00002000</tt></td><td valign="top">A "Open" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
162
 
<tr><td valign="top"><tt>QMessageBox.Save</tt></td><td align="center" valign="top"><tt>0x00000800</tt></td><td valign="top">A "Save" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
163
 
<tr><td valign="top"><tt>QMessageBox.Cancel</tt></td><td align="center" valign="top"><tt>0x00400000</tt></td><td valign="top">A "Cancel" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
164
 
<tr><td valign="top"><tt>QMessageBox.Close</tt></td><td align="center" valign="top"><tt>0x00200000</tt></td><td valign="top">A "Close" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
165
 
<tr><td valign="top"><tt>QMessageBox.Discard</tt></td><td align="center" valign="top"><tt>0x00800000</tt></td><td valign="top">A "Discard" or "Don't Save" button, depending on the platform, defined with the <a href="qmessagebox.html#ButtonRole-enum">DestructiveRole</a>.</td></tr>
166
 
<tr><td valign="top"><tt>QMessageBox.Apply</tt></td><td align="center" valign="top"><tt>0x02000000</tt></td><td valign="top">An "Apply" button defined with the <a href="qmessagebox.html#ButtonRole-enum">ApplyRole</a>.</td></tr>
167
 
<tr><td valign="top"><tt>QMessageBox.Reset</tt></td><td align="center" valign="top"><tt>0x04000000</tt></td><td valign="top">A "Reset" button defined with the <a href="qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
168
 
<tr><td valign="top"><tt>QMessageBox.RestoreDefaults</tt></td><td align="center" valign="top"><tt>0x08000000</tt></td><td valign="top">A "Restore Defaults" button defined with the <a href="qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
169
 
<tr><td valign="top"><tt>QMessageBox.Help</tt></td><td align="center" valign="top"><tt>0x01000000</tt></td><td valign="top">A "Help" button defined with the <a href="qmessagebox.html#ButtonRole-enum">HelpRole</a>.</td></tr>
170
 
<tr><td valign="top"><tt>QMessageBox.SaveAll</tt></td><td align="center" valign="top"><tt>0x00001000</tt></td><td valign="top">A "Save All" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
171
 
<tr><td valign="top"><tt>QMessageBox.Yes</tt></td><td align="center" valign="top"><tt>0x00004000</tt></td><td valign="top">A "Yes" button defined with the <a href="qmessagebox.html#ButtonRole-enum">YesRole</a>.</td></tr>
172
 
<tr><td valign="top"><tt>QMessageBox.YesToAll</tt></td><td align="center" valign="top"><tt>0x00008000</tt></td><td valign="top">A "Yes to All" button defined with the <a href="qmessagebox.html#ButtonRole-enum">YesRole</a>.</td></tr>
173
 
<tr><td valign="top"><tt>QMessageBox.No</tt></td><td align="center" valign="top"><tt>0x00010000</tt></td><td valign="top">A "No" button defined with the <a href="qmessagebox.html#ButtonRole-enum">NoRole</a>.</td></tr>
174
 
<tr><td valign="top"><tt>QMessageBox.NoToAll</tt></td><td align="center" valign="top"><tt>0x00020000</tt></td><td valign="top">A "No to All" button defined with the <a href="qmessagebox.html#ButtonRole-enum">NoRole</a>.</td></tr>
175
 
<tr><td valign="top"><tt>QMessageBox.Abort</tt></td><td align="center" valign="top"><tt>0x00040000</tt></td><td valign="top">An "Abort" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
176
 
<tr><td valign="top"><tt>QMessageBox.Retry</tt></td><td align="center" valign="top"><tt>0x00080000</tt></td><td valign="top">A "Retry" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
177
 
<tr><td valign="top"><tt>QMessageBox.Ignore</tt></td><td align="center" valign="top"><tt>0x00100000</tt></td><td valign="top">An "Ignore" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
178
 
<tr><td valign="top"><tt>QMessageBox.NoButton</tt></td><td align="center" valign="top"><tt>0x00000000</tt></td><td valign="top">An invalid button.</td></tr>
179
 
</table></p>
 
329
<table class="valuelist">
 
330
<tr class="odd">
 
331
<td />
 
332
</tr>
 
333
<tr>
 
334
<th class="tblConst">Constant</th>
 
335
<th class="tblval">Value</th>
 
336
<th class="tbldscr">Description</th>
 
337
</tr>
 
338
<tr>
 
339
<td class="topAlign"><tt>QMessageBox.NoIcon</tt></td>
 
340
<td class=" topAlign"><tt>0</tt></td>
 
341
<td class="topAlign">the message box does not have any icon.</td>
 
342
</tr>
 
343
<tr>
 
344
<td class="topAlign"><tt>QMessageBox.Question</tt></td>
 
345
<td class=" topAlign"><tt>4</tt></td>
 
346
<td class="topAlign">an icon indicating that the message is asking
 
347
a question.</td>
 
348
</tr>
 
349
<tr>
 
350
<td class="topAlign"><tt>QMessageBox.Information</tt></td>
 
351
<td class=" topAlign"><tt>1</tt></td>
 
352
<td class="topAlign">an icon indicating that the message is nothing
 
353
out of the ordinary.</td>
 
354
</tr>
 
355
<tr>
 
356
<td class="topAlign"><tt>QMessageBox.Warning</tt></td>
 
357
<td class=" topAlign"><tt>2</tt></td>
 
358
<td class="topAlign">an icon indicating that the message is a
 
359
warning, but can be dealt with.</td>
 
360
</tr>
 
361
<tr>
 
362
<td class="topAlign"><tt>QMessageBox.Critical</tt></td>
 
363
<td class=" topAlign"><tt>3</tt></td>
 
364
<td class="topAlign">an icon indicating that the message represents
 
365
a critical problem.</td>
 
366
</tr>
 
367
</table>
 
368
 
 
369
 
 
370
<h3 class="fn"><a name="StandardButton-enum" />QMessageBox.StandardButton</h3><p>These enums describe flags for standard buttons. Each button has
 
371
a defined <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a>.</p>
 
372
<table class="valuelist">
 
373
<tr class="odd">
 
374
<td />
 
375
</tr>
 
376
<tr>
 
377
<th class="tblConst">Constant</th>
 
378
<th class="tblval">Value</th>
 
379
<th class="tbldscr">Description</th>
 
380
</tr>
 
381
<tr>
 
382
<td class="topAlign"><tt>QMessageBox.Ok</tt></td>
 
383
<td class=" topAlign"><tt>0x00000400</tt></td>
 
384
<td class="topAlign">An "OK" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
385
</tr>
 
386
<tr>
 
387
<td class="topAlign"><tt>QMessageBox.Open</tt></td>
 
388
<td class=" topAlign"><tt>0x00002000</tt></td>
 
389
<td class="topAlign">A "Open" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
390
</tr>
 
391
<tr>
 
392
<td class="topAlign"><tt>QMessageBox.Save</tt></td>
 
393
<td class=" topAlign"><tt>0x00000800</tt></td>
 
394
<td class="topAlign">A "Save" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
395
</tr>
 
396
<tr>
 
397
<td class="topAlign"><tt>QMessageBox.Cancel</tt></td>
 
398
<td class=" topAlign"><tt>0x00400000</tt></td>
 
399
<td class="topAlign">A "Cancel" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td>
 
400
</tr>
 
401
<tr>
 
402
<td class="topAlign"><tt>QMessageBox.Close</tt></td>
 
403
<td class=" topAlign"><tt>0x00200000</tt></td>
 
404
<td class="topAlign">A "Close" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td>
 
405
</tr>
 
406
<tr>
 
407
<td class="topAlign"><tt>QMessageBox.Discard</tt></td>
 
408
<td class=" topAlign"><tt>0x00800000</tt></td>
 
409
<td class="topAlign">A "Discard" or "Don't Save" button, depending
 
410
on the platform, defined with the <a href="qmessagebox.html#ButtonRole-enum">DestructiveRole</a>.</td>
 
411
</tr>
 
412
<tr>
 
413
<td class="topAlign"><tt>QMessageBox.Apply</tt></td>
 
414
<td class=" topAlign"><tt>0x02000000</tt></td>
 
415
<td class="topAlign">An "Apply" button defined with the <a href="qmessagebox.html#ButtonRole-enum">ApplyRole</a>.</td>
 
416
</tr>
 
417
<tr>
 
418
<td class="topAlign"><tt>QMessageBox.Reset</tt></td>
 
419
<td class=" topAlign"><tt>0x04000000</tt></td>
 
420
<td class="topAlign">A "Reset" button defined with the <a href="qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td>
 
421
</tr>
 
422
<tr>
 
423
<td class="topAlign"><tt>QMessageBox.RestoreDefaults</tt></td>
 
424
<td class=" topAlign"><tt>0x08000000</tt></td>
 
425
<td class="topAlign">A "Restore Defaults" button defined with the
 
426
<a href="qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td>
 
427
</tr>
 
428
<tr>
 
429
<td class="topAlign"><tt>QMessageBox.Help</tt></td>
 
430
<td class=" topAlign"><tt>0x01000000</tt></td>
 
431
<td class="topAlign">A "Help" button defined with the <a href="qmessagebox.html#ButtonRole-enum">HelpRole</a>.</td>
 
432
</tr>
 
433
<tr>
 
434
<td class="topAlign"><tt>QMessageBox.SaveAll</tt></td>
 
435
<td class=" topAlign"><tt>0x00001000</tt></td>
 
436
<td class="topAlign">A "Save All" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
437
</tr>
 
438
<tr>
 
439
<td class="topAlign"><tt>QMessageBox.Yes</tt></td>
 
440
<td class=" topAlign"><tt>0x00004000</tt></td>
 
441
<td class="topAlign">A "Yes" button defined with the <a href="qmessagebox.html#ButtonRole-enum">YesRole</a>.</td>
 
442
</tr>
 
443
<tr>
 
444
<td class="topAlign"><tt>QMessageBox.YesToAll</tt></td>
 
445
<td class=" topAlign"><tt>0x00008000</tt></td>
 
446
<td class="topAlign">A "Yes to All" button defined with the
 
447
<a href="qmessagebox.html#ButtonRole-enum">YesRole</a>.</td>
 
448
</tr>
 
449
<tr>
 
450
<td class="topAlign"><tt>QMessageBox.No</tt></td>
 
451
<td class=" topAlign"><tt>0x00010000</tt></td>
 
452
<td class="topAlign">A "No" button defined with the <a href="qmessagebox.html#ButtonRole-enum">NoRole</a>.</td>
 
453
</tr>
 
454
<tr>
 
455
<td class="topAlign"><tt>QMessageBox.NoToAll</tt></td>
 
456
<td class=" topAlign"><tt>0x00020000</tt></td>
 
457
<td class="topAlign">A "No to All" button defined with the <a href="qmessagebox.html#ButtonRole-enum">NoRole</a>.</td>
 
458
</tr>
 
459
<tr>
 
460
<td class="topAlign"><tt>QMessageBox.Abort</tt></td>
 
461
<td class=" topAlign"><tt>0x00040000</tt></td>
 
462
<td class="topAlign">An "Abort" button defined with the <a href="qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td>
 
463
</tr>
 
464
<tr>
 
465
<td class="topAlign"><tt>QMessageBox.Retry</tt></td>
 
466
<td class=" topAlign"><tt>0x00080000</tt></td>
 
467
<td class="topAlign">A "Retry" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
468
</tr>
 
469
<tr>
 
470
<td class="topAlign"><tt>QMessageBox.Ignore</tt></td>
 
471
<td class=" topAlign"><tt>0x00100000</tt></td>
 
472
<td class="topAlign">An "Ignore" button defined with the <a href="qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td>
 
473
</tr>
 
474
<tr>
 
475
<td class="topAlign"><tt>QMessageBox.NoButton</tt></td>
 
476
<td class=" topAlign"><tt>0x00000000</tt></td>
 
477
<td class="topAlign">An invalid button.</td>
 
478
</tr>
 
479
</table>
180
480
<p>The following values are obsolete:</p>
181
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
182
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
183
 
<tr><td valign="top"><tt>QMessageBox.YesAll</tt></td><td align="center" valign="top"><tt>YesToAll</tt></td><td valign="top">Use YesToAll instead.</td></tr>
184
 
<tr><td valign="top"><tt>QMessageBox.NoAll</tt></td><td align="center" valign="top"><tt>NoToAll</tt></td><td valign="top">Use NoToAll instead.</td></tr>
185
 
<tr><td valign="top"><tt>QMessageBox.Default</tt></td><td align="center" valign="top"><tt>0x00000100</tt></td><td valign="top">Use the <tt>defaultButton</tt> argument of <a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#warning">warning</a>(), etc. instead, or call <a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>().</td></tr>
186
 
<tr><td valign="top"><tt>QMessageBox.Escape</tt></td><td align="center" valign="top"><tt>0x00000200</tt></td><td valign="top">Call <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>() instead.</td></tr>
187
 
<tr><td valign="top"><tt>QMessageBox.FlagMask</tt></td><td align="center" valign="top"><tt>0x00000300</tt></td><td valign="top">&#160;</td></tr>
188
 
<tr><td valign="top"><tt>QMessageBox.ButtonMask</tt></td><td align="center" valign="top"><tt>~FlagMask</tt></td><td valign="top">&#160;</td></tr>
189
 
</table></p>
 
481
<table class="valuelist">
 
482
<tr class="even">
 
483
<td />
 
484
</tr>
 
485
<tr>
 
486
<th class="tblConst">Constant</th>
 
487
<th class="tblval">Value</th>
 
488
<th class="tbldscr">Description</th>
 
489
</tr>
 
490
<tr>
 
491
<td class="topAlign"><tt>QMessageBox.YesAll</tt></td>
 
492
<td class=" topAlign"><tt>YesToAll</tt></td>
 
493
<td class="topAlign">Use YesToAll instead.</td>
 
494
</tr>
 
495
<tr>
 
496
<td class="topAlign"><tt>QMessageBox.NoAll</tt></td>
 
497
<td class=" topAlign"><tt>NoToAll</tt></td>
 
498
<td class="topAlign">Use NoToAll instead.</td>
 
499
</tr>
 
500
<tr>
 
501
<td class="topAlign"><tt>QMessageBox.Default</tt></td>
 
502
<td class=" topAlign"><tt>0x00000100</tt></td>
 
503
<td class="topAlign">Use the <tt>defaultButton</tt> argument of
 
504
<a href="qmessagebox.html#information">information</a>(), <a href="qmessagebox.html#warning">warning</a>(), etc. instead, or call
 
505
<a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>().</td>
 
506
</tr>
 
507
<tr>
 
508
<td class="topAlign"><tt>QMessageBox.Escape</tt></td>
 
509
<td class=" topAlign"><tt>0x00000200</tt></td>
 
510
<td class="topAlign">Call <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>()
 
511
instead.</td>
 
512
</tr>
 
513
<tr>
 
514
<td class="topAlign"><tt>QMessageBox.FlagMask</tt></td>
 
515
<td class=" topAlign"><tt>0x00000300</tt></td>
 
516
<td class="topAlign">&#160;</td>
 
517
</tr>
 
518
<tr>
 
519
<td class="topAlign"><tt>QMessageBox.ButtonMask</tt></td>
 
520
<td class=" topAlign"><tt>~FlagMask</tt></td>
 
521
<td class="topAlign">&#160;</td>
 
522
</tr>
 
523
</table>
190
524
<p>This enum was introduced in Qt 4.2.</p>
191
 
<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>
 
525
<p>The StandardButtons type is a typedef for <a href="qflags.html">QFlags</a>&lt;StandardButton&gt;. It stores an OR
 
526
combination of StandardButton values.</p>
192
527
<p>See also <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a> and <a href="qmessagebox.html#standardButtons-prop">standardButtons</a>.</p>
193
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMessageBox" />QMessageBox.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a message box with no text and no buttons. <i>parent</i> is passed to the <a href="qdialog.html">QDialog</a> constructor.</p>
194
 
<p>On Mac OS X, if you want your message box to appear as a <a href="qt.html#WindowType-enum">Qt.Sheet</a> of its <i>parent</i>, set the message box's <a href="qmessagebox.html#setWindowModality">window modality</a> to <a href="qt.html#WindowModality-enum">Qt.WindowModal</a> or use <a href="qmessagebox.html#open">open</a>(). Otherwise, the message box will be a standard dialog.</p>
195
 
<h3 class="fn"><a name="QMessageBox-2" />QMessageBox.__init__ (<i>self</i>, <a href="qmessagebox.html#Icon-enum">Icon</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.NoButton, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a message box with the given <i>icon</i>, <i>title</i>, <i>text</i>, and standard <i>buttons</i>. Standard or custom buttons can be added at any time using <a href="qmessagebox.html#addButton">addButton</a>(). The <i>parent</i> and <i>f</i> arguments are passed to the <a href="qdialog.html">QDialog</a> constructor.</p>
196
 
<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>
197
 
<p>On Mac OS X, if <i>parent</i> is not 0 and you want your message box to appear as a <a href="qt.html#WindowType-enum">Qt.Sheet</a> of that parent, set the message box's <a href="qmessagebox.html#setWindowModality">window modality</a> to <a href="qt.html#WindowModality-enum">Qt.WindowModal</a> (default). Otherwise, the message box will be a standard dialog.</p>
 
528
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMessageBox" />QMessageBox.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a message box with no text and no buttons.
 
529
<i>parent</i> is passed to the <a href="qdialog.html">QDialog</a>
 
530
constructor.</p>
 
531
<p>On Mac OS X, if you want your message box to appear as a
 
532
<a href="qt.html#WindowType-enum">Qt.Sheet</a> of its
 
533
<i>parent</i>, set the message box's <a href="qmessagebox.html#setWindowModality">window modality</a> to
 
534
<a href="qt.html#WindowModality-enum">Qt.WindowModal</a> or use
 
535
<a href="qmessagebox.html#open">open</a>(). Otherwise, the message
 
536
box will be a standard dialog.</p>
 
537
 
 
538
 
 
539
<h3 class="fn"><a name="QMessageBox-2" />QMessageBox.__init__ (<i>self</i>, <a href="qmessagebox.html#Icon-enum">Icon</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.NoButton, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a message box with the given <i>icon</i>,
 
540
<i>title</i>, <i>text</i>, and standard <i>buttons</i>. Standard or
 
541
custom buttons can be added at any time using <a href="qmessagebox.html#addButton">addButton</a>(). The <i>parent</i> and
 
542
<i>f</i> arguments are passed to the <a href="qdialog.html">QDialog</a> constructor.</p>
 
543
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If
 
544
<i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to
 
545
<i>parent</i>.</p>
 
546
<p>On Mac OS X, if <i>parent</i> is not 0 and you want your message
 
547
box to appear as a <a href="qt.html#WindowType-enum">Qt.Sheet</a>
 
548
of that parent, set the message box's <a href="qmessagebox.html#setWindowModality">window modality</a> to
 
549
<a href="qt.html#WindowModality-enum">Qt.WindowModal</a>
 
550
(default). Otherwise, the message box will be a standard
 
551
dialog.</p>
198
552
<p>See also <a href="qmessagebox.html#setWindowTitle">setWindowTitle</a>(), <a href="qmessagebox.html#text-prop">setText</a>(), <a href="qmessagebox.html#icon-prop">setIcon</a>(), and <a href="qmessagebox.html#standardButtons-prop">setStandardButtons</a>().</p>
199
 
<a name="//apple_ref/cpp/instm/QMessageBox/~QMessageBox" />
200
 
<h3 class="fn"><a name="QMessageBox-3" />QMessageBox.__init__ (<i>self</i>, QString, QString, <a href="qmessagebox.html#Icon-enum">Icon</a>, int, int, int, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><h3 class="fn"><a name="about" />QMessageBox.about (<a href="qwidget.html">QWidget</a>, QString, QString)</h3><p>Displays a simple about box with title <i>title</i> and text <i>text</i>. The about box's parent is <i>parent</i>.</p>
 
553
 
 
554
 
 
555
<h3 class="fn"><a name="QMessageBox-3" />QMessageBox.__init__ (<i>self</i>, QString, QString, <a href="qmessagebox.html#Icon-enum">Icon</a>, int, int, int, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><h3 class="fn"><a name="about" />QMessageBox.about (<a href="qwidget.html">QWidget</a>, QString, QString)</h3><p>Displays a simple about box with title <i>title</i> and text
 
556
<i>text</i>. The about box's parent is <i>parent</i>.</p>
201
557
<p>about() looks for a suitable icon in four locations:</p>
202
558
<ol type="1">
203
 
<li>It prefers <a href="qwidget.html#windowIcon-prop">parent-&gt;icon()</a> if that exists.</li>
204
 
<li>If not, it tries the top-level widget containing <i>parent</i>.</li>
 
559
<li>It prefers <a href="qwidget.html#windowIcon-prop">parent-&gt;icon()</a> if that
 
560
exists.</li>
 
561
<li>If not, it tries the top-level widget containing
 
562
<i>parent</i>.</li>
205
563
<li>If that fails, it tries the <a href="qapplication.html#activeWindow">active window.</a></li>
206
564
<li>As a last resort it uses the Information icon.</li>
207
565
</ol>
208
 
<p>The about box has a single button labelled "OK". On Mac OS X, the about box is popped up as a modeless window; on other platforms, it is currently a window modal.</p>
209
 
<p>See also <a href="qwidget.html#windowIcon-prop">QWidget.windowIcon</a>() and <a href="qapplication.html#activeWindow">QApplication.activeWindow</a>().</p>
210
 
<a name="//apple_ref/cpp/clm/QMessageBox/aboutQt" />
211
 
<h3 class="fn"><a name="aboutQt" />QMessageBox.aboutQt (<a href="qwidget.html">QWidget</a>, QString&#160;<i>title</i>&#160;=&#160;QString())</h3><p>Displays a simple message box about Qt, with the given <i>title</i> and centered over <i>parent</i> (if <i>parent</i> is not 0). The message includes the version number of Qt being used by the application.</p>
212
 
<p>This is useful for inclusion in the <b>Help</b> menu of an application, as shown in the <a href="mainwindows-menus.html">Menus</a> example.</p>
213
 
<p><a href="qapplication.html">QApplication</a> provides this functionality as a slot.</p>
214
 
<p>On Mac OS X, the about box is popped up as a modeless window; on other platforms, it is currently window modal.</p>
 
566
<p>The about box has a single button labelled "OK". On Mac OS X,
 
567
the about box is popped up as a modeless window; on other
 
568
platforms, it is currently a window modal.</p>
 
569
<p>See also <a href="qwidget.html#windowIcon-prop">QWidget.windowIcon</a>() and
 
570
<a href="qapplication.html#activeWindow">QApplication.activeWindow</a>().</p>
 
571
 
 
572
 
 
573
<h3 class="fn"><a name="aboutQt" />QMessageBox.aboutQt (<a href="qwidget.html">QWidget</a>, QString&#160;<i>title</i>&#160;=&#160;QString())</h3><p>Displays a simple message box about Qt, with the given
 
574
<i>title</i> and centered over <i>parent</i> (if <i>parent</i> is
 
575
not 0). The message includes the version number of Qt being used by
 
576
the application.</p>
 
577
<p>This is useful for inclusion in the <b>Help</b> menu of an
 
578
application, as shown in the <a href="mainwindows-menus.html">Menus</a> example.</p>
 
579
<p><a href="qapplication.html">QApplication</a> provides this
 
580
functionality as a slot.</p>
 
581
<p>On Mac OS X, the about box is popped up as a modeless window; on
 
582
other platforms, it is currently window modal.</p>
215
583
<p>See also <a href="qapplication.html#aboutQt">QApplication.aboutQt</a>().</p>
216
 
<a name="//apple_ref/cpp/instm/QMessageBox/addButton" />
217
 
<h3 class="fn"><a name="addButton" />QMessageBox.addButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>, <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a>)</h3><p>The <i>QAbstractButton</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>button</i> to the message box with the specified <i>role</i>.</p>
 
584
 
 
585
 
 
586
<h3 class="fn"><a name="addButton" />QMessageBox.addButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>, <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a>)</h3><p>The <i>QAbstractButton</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>button</i> to the message box with the
 
587
specified <i>role</i>.</p>
218
588
<p>This function was introduced in Qt 4.2.</p>
219
589
<p>See also <a href="qmessagebox.html#removeButton">removeButton</a>(), <a href="qmessagebox.html#button">button</a>(), and <a href="qmessagebox.html#standardButtons-prop">setStandardButtons</a>().</p>
 
590
 
 
591
 
220
592
<h3 class="fn"><a name="addButton-2" /><a href="qpushbutton.html">QPushButton</a> QMessageBox.addButton (<i>self</i>, QString, <a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a>)</h3><p>This is an overloaded function.</p>
221
 
<p>Creates a button with the given <i>text</i>, adds it to the message box for the specified <i>role</i>, and returns it.</p>
 
593
<p>Creates a button with the given <i>text</i>, adds it to the
 
594
message box for the specified <i>role</i>, and returns it.</p>
222
595
<p>This function was introduced in Qt 4.2.</p>
 
596
 
 
597
 
223
598
<h3 class="fn"><a name="addButton-3" /><a href="qpushbutton.html">QPushButton</a> QMessageBox.addButton (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>This is an overloaded function.</p>
224
 
<p>Adds a standard <i>button</i> to the message box if it is valid to do so, and returns the push button.</p>
 
599
<p>Adds a standard <i>button</i> to the message box if it is valid
 
600
to do so, and returns the push button.</p>
225
601
<p>This function was introduced in Qt 4.2.</p>
226
602
<p>See also <a href="qmessagebox.html#standardButtons-prop">setStandardButtons</a>().</p>
227
 
<a name="//apple_ref/cpp/instm/QMessageBox/button" />
228
 
<h3 class="fn"><a name="button" /><a href="qabstractbutton.html">QAbstractButton</a> QMessageBox.button (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Returns a pointer corresponding to the standard button <i>which</i>, or 0 if the standard button doesn't exist in this message box.</p>
 
603
 
 
604
 
 
605
<h3 class="fn"><a name="button" /><a href="qabstractbutton.html">QAbstractButton</a> QMessageBox.button (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Returns a pointer corresponding to the standard button
 
606
<i>which</i>, or 0 if the standard button doesn't exist in this
 
607
message box.</p>
229
608
<p>This function was introduced in Qt 4.2.</p>
230
 
<p>See also <a href="qmessagebox.html#standardButtons-prop">standardButtons</a> and <a href="qmessagebox.html#standardButton">standardButton</a>().</p>
231
 
<a name="//apple_ref/cpp/instm/QMessageBox/buttonClicked" />
232
 
<h3 class="fn"><a name="buttonRole" /><a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a> QMessageBox.buttonRole (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Returns the button role for the specified <i>button</i>. This function returns <a href="qmessagebox.html#ButtonRole-enum">InvalidRole</a> if <i>button</i> is 0 or has not been added to the message box.</p>
233
 
<p>This function was introduced in Qt 4.5.</p>
234
 
<p>See also <a href="qmessagebox.html#buttons">buttons</a>() and <a href="qmessagebox.html#addButton">addButton</a>().</p>
235
 
<a name="//apple_ref/cpp/instm/QMessageBox/buttons" />
236
 
<h3 class="fn"><a name="buttons" />list-of-QAbstractButton QMessageBox.buttons (<i>self</i>)</h3><p>Returns a list of all the buttons that have been added to the message box.</p>
237
 
<p>This function was introduced in Qt 4.5.</p>
238
 
<p>See also <a href="qmessagebox.html#buttonRole">buttonRole</a>(), <a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qmessagebox.html#removeButton">removeButton</a>().</p>
239
 
<a name="//apple_ref/cpp/instm/QMessageBox/changeEvent" />
 
609
<p>See also <a href="qmessagebox.html#standardButtons-prop">standardButtons</a> and
 
610
<a href="qmessagebox.html#standardButton">standardButton</a>().</p>
 
611
 
 
612
 
 
613
<h3 class="fn"><a name="buttonRole" /><a href="qmessagebox.html#ButtonRole-enum">ButtonRole</a> QMessageBox.buttonRole (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Returns the button role for the specified <i>button</i>. This
 
614
function returns <a href="qmessagebox.html#ButtonRole-enum">InvalidRole</a> if <i>button</i>
 
615
is 0 or has not been added to the message box.</p>
 
616
<p>This function was introduced in Qt 4.5.</p>
 
617
<p>See also <a href="qmessagebox.html#buttons">buttons</a>() and
 
618
<a href="qmessagebox.html#addButton">addButton</a>().</p>
 
619
 
 
620
 
 
621
<h3 class="fn"><a name="buttons" />list-of-QAbstractButton QMessageBox.buttons (<i>self</i>)</h3><p>Returns a list of all the buttons that have been added to the
 
622
message box.</p>
 
623
<p>This function was introduced in Qt 4.5.</p>
 
624
<p>See also <a href="qmessagebox.html#buttonRole">buttonRole</a>(),
 
625
<a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qmessagebox.html#removeButton">removeButton</a>().</p>
 
626
 
 
627
 
240
628
<h3 class="fn"><a name="buttonText" />QString QMessageBox.buttonText (<i>self</i>, int)</h3><h3 class="fn"><a name="changeEvent" />QMessageBox.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>
241
 
<a name="//apple_ref/cpp/instm/QMessageBox/clickedButton" />
242
 
<h3 class="fn"><a name="clickedButton" /><a href="qabstractbutton.html">QAbstractButton</a> QMessageBox.clickedButton (<i>self</i>)</h3><p>Returns the button that was clicked by the user, or 0 if the user hit the <b>Esc</b> key and no <a href="qmessagebox.html#setEscapeButton">escape button</a> was set.</p>
243
 
<p>If <a href="qmessagebox.html#exec">exec_</a>() hasn't been called yet, returns 0.</p>
 
629
 
 
630
 
 
631
<h3 class="fn"><a name="clickedButton" /><a href="qabstractbutton.html">QAbstractButton</a> QMessageBox.clickedButton (<i>self</i>)</h3><p>Returns the button that was clicked by the user, or 0 if the
 
632
user hit the <b>Esc</b> key and no <a href="qmessagebox.html#setEscapeButton">escape button</a> was set.</p>
 
633
<p>If <a href="qmessagebox.html#exec">exec_</a>() hasn't been called
 
634
yet, returns 0.</p>
244
635
<p>Example:</p>
245
 
<pre> QMessageBox messageBox(this);
 
636
<pre class="highlightedCode brush: cpp">
 
637
 QMessageBox messageBox(this);
246
638
 QAbstractButton *disconnectButton =
247
639
       messageBox.addButton(tr("Disconnect"), QMessageBox.ActionRole);
248
640
 ...
249
641
 messageBox.exec();
250
642
 if (messageBox.clickedButton() == disconnectButton) {
251
643
     ...
252
 
 }</pre>
 
644
 }
 
645
</pre>
253
646
<p>This function was introduced in Qt 4.2.</p>
254
647
<p>See also <a href="qmessagebox.html#standardButton">standardButton</a>() and <a href="qmessagebox.html#button">button</a>().</p>
255
 
<a name="//apple_ref/cpp/instm/QMessageBox/closeEvent" />
 
648
 
 
649
 
256
650
<h3 class="fn"><a name="closeEvent" />QMessageBox.closeEvent (<i>self</i>, <a href="qcloseevent.html">QCloseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#closeEvent">QWidget.closeEvent</a>().</p>
257
 
<a name="//apple_ref/cpp/clm/QMessageBox/critical" />
258
 
<h3 class="fn"><a name="critical" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a critical message box with the specified <i>title</i> and <i>text</i>. The standard <i>buttons</i> are added to the message box. <i>defaultButton</i> specifies the button used when <b>Enter</b> is pressed. <i>defaultButton</i> must refer to a button that was given in <i>buttons</i>. If <i>defaultButton</i> is <a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>, <a href="qmessagebox.html">QMessageBox</a> chooses a suitable default automatically.</p>
259
 
<p>Returns the identity of the standard button that was clicked. If <b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is returned.</p>
260
 
<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>
261
 
<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>
262
 
<p>This function was introduced in Qt 4.2.</p>
263
 
<p>See also <a href="qmessagebox.html#question">question</a>(), <a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#information">information</a>().</p>
264
 
<a name="//apple_ref/cpp/instm/QMessageBox/defaultButton" />
265
 
<h3 class="fn"><a name="critical-2" />int QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="critical-3" />int QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="defaultButton" /><a href="qpushbutton.html">QPushButton</a> QMessageBox.defaultButton (<i>self</i>)</h3><p>Returns the button that should be the message box's <a href="qpushbutton.html#default-prop">default button</a>. Returns 0 if no default button was set.</p>
266
 
<p>This function was introduced in Qt 4.2.</p>
267
 
<p>See also <a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>(), <a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qpushbutton.html#default-prop">QPushButton.setDefault</a>().</p>
268
 
<a name="//apple_ref/cpp/instm/QMessageBox/escapeButton" />
 
651
 
 
652
 
 
653
<h3 class="fn"><a name="critical" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a critical message box with the specified <i>title</i> and
 
654
<i>text</i>. The standard <i>buttons</i> are added to the message
 
655
box. <i>defaultButton</i> specifies the button used when
 
656
<b>Enter</b> is pressed. <i>defaultButton</i> must refer to a
 
657
button that was given in <i>buttons</i>. If <i>defaultButton</i> is
 
658
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>,
 
659
<a href="qmessagebox.html">QMessageBox</a> chooses a suitable
 
660
default automatically.</p>
 
661
<p>Returns the identity of the standard button that was clicked. If
 
662
<b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is
 
663
returned.</p>
 
664
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If
 
665
<i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to
 
666
<i>parent</i>.</p>
 
667
<p><b>Warning:</b> Do not delete <i>parent</i> during the execution
 
668
of the dialog. If you want to do this, you should create the dialog
 
669
yourself using one of the <a href="qmessagebox.html">QMessageBox</a> constructors.</p>
 
670
<p>This function was introduced in Qt 4.2.</p>
 
671
<p>See also <a href="qmessagebox.html#question">question</a>(),
 
672
<a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#information">information</a>().</p>
 
673
 
 
674
 
 
675
<h3 class="fn"><a name="critical-2" />int QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="critical-3" />int QMessageBox.critical (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="defaultButton" /><a href="qpushbutton.html">QPushButton</a> QMessageBox.defaultButton (<i>self</i>)</h3><p>Returns the button that should be the message box's <a href="qpushbutton.html#default-prop">default button</a>. Returns 0 if no
 
676
default button was set.</p>
 
677
<p>This function was introduced in Qt 4.2.</p>
 
678
<p>See also <a href="qmessagebox.html#setDefaultButton">setDefaultButton</a>(),
 
679
<a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qpushbutton.html#default-prop">QPushButton.setDefault</a>().</p>
 
680
 
 
681
 
269
682
<h3 class="fn"><a name="detailedText" />QString QMessageBox.detailedText (<i>self</i>)</h3><h3 class="fn"><a name="escapeButton" /><a href="qabstractbutton.html">QAbstractButton</a> QMessageBox.escapeButton (<i>self</i>)</h3><p>Returns the button that is activated when escape is pressed.</p>
270
 
<p>By default, <a href="qmessagebox.html">QMessageBox</a> attempts to automatically detect an escape button as follows:</p>
 
683
<p>By default, <a href="qmessagebox.html">QMessageBox</a> attempts
 
684
to automatically detect an escape button as follows:</p>
271
685
<ol type="1">
272
686
<li>If there is only one button, it is made the escape button.</li>
273
 
<li>If there is a <a href="qmessagebox.html#StandardButton-enum">Cancel</a> button, it is made the escape button.</li>
274
 
<li>On Mac OS X only, if there is exactly one button with the role <a href="qmessagebox.html#ButtonRole-enum">QMessageBox.RejectRole</a>, it is made the escape button.</li>
 
687
<li>If there is a <a href="qmessagebox.html#StandardButton-enum">Cancel</a> button, it is
 
688
made the escape button.</li>
 
689
<li>On Mac OS X only, if there is exactly one button with the role
 
690
<a href="qmessagebox.html#ButtonRole-enum">QMessageBox.RejectRole</a>, it
 
691
is made the escape button.</li>
275
692
</ol>
276
 
<p>When an escape button could not be automatically detected, pressing <b>Esc</b> has no effect.</p>
 
693
<p>When an escape button could not be automatically detected,
 
694
pressing <b>Esc</b> has no effect.</p>
277
695
<p>This function was introduced in Qt 4.2.</p>
278
 
<p>See also <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>() and <a href="qmessagebox.html#addButton">addButton</a>().</p>
279
 
<a name="//apple_ref/cpp/instm/QMessageBox/event" />
 
696
<p>See also <a href="qmessagebox.html#setEscapeButton">setEscapeButton</a>() and
 
697
<a href="qmessagebox.html#addButton">addButton</a>().</p>
 
698
 
 
699
 
280
700
<h3 class="fn"><a name="event" />bool QMessageBox.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
281
 
<a name="//apple_ref/cpp/instm/QMessageBox/exec" />
282
 
<h3 class="fn"><a name="icon" /><a href="qmessagebox.html#Icon-enum">Icon</a> QMessageBox.icon (<i>self</i>)</h3><h3 class="fn"><a name="iconPixmap" /><a href="qpixmap.html">QPixmap</a> QMessageBox.iconPixmap (<i>self</i>)</h3><h3 class="fn"><a name="information" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.information (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens an information message box with the specified <i>title</i> and <i>text</i>. The standard <i>buttons</i> are added to the message box. <i>defaultButton</i> specifies the button used when <b>Enter</b> is pressed. <i>defaultButton</i> must refer to a button that was given in <i>buttons</i>. If <i>defaultButton</i> is <a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>, <a href="qmessagebox.html">QMessageBox</a> chooses a suitable default automatically.</p>
283
 
<p>Returns the identity of the standard button that was clicked. If <b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is returned.</p>
284
 
<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>
 
701
 
 
702
 
 
703
<h3 class="fn"><a name="icon" /><a href="qmessagebox.html#Icon-enum">Icon</a> QMessageBox.icon (<i>self</i>)</h3><h3 class="fn"><a name="iconPixmap" /><a href="qpixmap.html">QPixmap</a> QMessageBox.iconPixmap (<i>self</i>)</h3><h3 class="fn"><a name="information" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.information (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens an information message box with the specified <i>title</i>
 
704
and <i>text</i>. The standard <i>buttons</i> are added to the
 
705
message box. <i>defaultButton</i> specifies the button used when
 
706
<b>Enter</b> is pressed. <i>defaultButton</i> must refer to a
 
707
button that was given in <i>buttons</i>. If <i>defaultButton</i> is
 
708
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>,
 
709
<a href="qmessagebox.html">QMessageBox</a> chooses a suitable
 
710
default automatically.</p>
 
711
<p>Returns the identity of the standard button that was clicked. If
 
712
<b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is
 
713
returned.</p>
 
714
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If
 
715
<i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to
 
716
<i>parent</i>.</p>
285
717
<p>This function was introduced in Qt 4.2.</p>
286
 
<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>
287
 
<a name="//apple_ref/cpp/instm/QMessageBox/keyPressEvent" />
 
718
<p>See also <a href="qmessagebox.html#question">question</a>(),
 
719
<a href="qmessagebox.html#warning">warning</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
 
720
 
 
721
 
288
722
<h3 class="fn"><a name="information-2" />int QMessageBox.information (<a href="qwidget.html">QWidget</a>, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="information-3" />int QMessageBox.information (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="informativeText" />QString QMessageBox.informativeText (<i>self</i>)</h3><h3 class="fn"><a name="keyPressEvent" />QMessageBox.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>
289
 
<a name="//apple_ref/cpp/instm/QMessageBox/open" />
 
723
 
 
724
 
290
725
<h3 class="fn"><a name="open" />QMessageBox.open (<i>self</i>)</h3><p>This is an overloaded function.</p>
291
 
<p>Opens the dialog and connects its <a href="qdialog.html#finished">finished</a>() or <a href="qmessagebox.html#buttonClicked">buttonClicked</a>() signal to the slot specified by <i>receiver</i> and <i>member</i>. If the slot in <i>member</i> has a pointer for its first parameter the connection is to <a href="qmessagebox.html#buttonClicked">buttonClicked</a>(), otherwise the connection is to <a href="qdialog.html#finished">finished</a>().</p>
292
 
<p>The signal will be disconnected from the slot when the dialog is closed.</p>
293
 
<a name="//apple_ref/cpp/clm/QMessageBox/question" />
294
 
<h3 class="fn"><a name="open-2" />QMessageBox.open (<i>self</i>, <a href="qobject.html">QObject</a>, SLOT()SLOT())</h3><h3 class="fn"><a name="open-3" />QMessageBox.open (<i>self</i>, callable)</h3><h3 class="fn"><a name="question" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a question message box with the specified <i>title</i> and <i>text</i>. The standard <i>buttons</i> are added to the message box. <i>defaultButton</i> specifies the button used when <b>Enter</b> is pressed. <i>defaultButton</i> must refer to a button that was given in <i>buttons</i>. If <i>defaultButton</i> is <a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>, <a href="qmessagebox.html">QMessageBox</a> chooses a suitable default automatically.</p>
295
 
<p>Returns the identity of the standard button that was clicked. If <b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is returned.</p>
296
 
<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>
 
726
<p>Opens the dialog and connects its <a href="qdialog.html#finished">finished</a>() or <a href="qmessagebox.html#buttonClicked">buttonClicked</a>() signal to the
 
727
slot specified by <i>receiver</i> and <i>member</i>. If the slot in
 
728
<i>member</i> has a pointer for its first parameter the connection
 
729
is to <a href="qmessagebox.html#buttonClicked">buttonClicked</a>(),
 
730
otherwise the connection is to <a href="qdialog.html#finished">finished</a>().</p>
 
731
<p>The signal will be disconnected from the slot when the dialog is
 
732
closed.</p>
 
733
 
 
734
 
 
735
<h3 class="fn"><a name="open-2" />QMessageBox.open (<i>self</i>, <a href="qobject.html">QObject</a>, SLOT()SLOT())</h3><h3 class="fn"><a name="open-3" />QMessageBox.open (<i>self</i>, callable)</h3><h3 class="fn"><a name="question" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a question message box with the specified <i>title</i> and
 
736
<i>text</i>. The standard <i>buttons</i> are added to the message
 
737
box. <i>defaultButton</i> specifies the button used when
 
738
<b>Enter</b> is pressed. <i>defaultButton</i> must refer to a
 
739
button that was given in <i>buttons</i>. If <i>defaultButton</i> is
 
740
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>,
 
741
<a href="qmessagebox.html">QMessageBox</a> chooses a suitable
 
742
default automatically.</p>
 
743
<p>Returns the identity of the standard button that was clicked. If
 
744
<b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is
 
745
returned.</p>
 
746
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If
 
747
<i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to
 
748
<i>parent</i>.</p>
297
749
<p>This function was introduced in Qt 4.2.</p>
298
750
<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>
299
 
<a name="//apple_ref/cpp/instm/QMessageBox/removeButton" />
300
 
<h3 class="fn"><a name="question-2" />int QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="question-3" />int QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="removeButton" />QMessageBox.removeButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>The <i>QAbstractButton</i> argument</p><p>Removes <i>button</i> from the button box without deleting it.</p>
 
751
 
 
752
 
 
753
<h3 class="fn"><a name="question-2" />int QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, int, int&#160;<i>button1</i>&#160;=&#160;0, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="question-3" />int QMessageBox.question (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><h3 class="fn"><a name="removeButton" />QMessageBox.removeButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>The <i>QAbstractButton</i> argument</p><p>Removes <i>button</i> from the button box without deleting
 
754
it.</p>
301
755
<p>This function was introduced in Qt 4.2.</p>
302
 
<p>See also <a href="qmessagebox.html#addButton">addButton</a>() and <a href="qmessagebox.html#standardButtons-prop">setStandardButtons</a>().</p>
303
 
<a name="//apple_ref/cpp/instm/QMessageBox/resizeEvent" />
 
756
<p>See also <a href="qmessagebox.html#addButton">addButton</a>()
 
757
and <a href="qmessagebox.html#standardButtons-prop">setStandardButtons</a>().</p>
 
758
 
 
759
 
304
760
<h3 class="fn"><a name="resizeEvent" />QMessageBox.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>
305
 
<a name="//apple_ref/cpp/instm/QMessageBox/setDefaultButton" />
306
 
<h3 class="fn"><a name="setButtonText" />QMessageBox.setButtonText (<i>self</i>, int, QString)</h3><h3 class="fn"><a name="setDefaultButton" />QMessageBox.setDefaultButton (<i>self</i>, <a href="qpushbutton.html">QPushButton</a>)</h3><p>Sets the message box's <a href="qpushbutton.html#default-prop">default button</a> to <i>button</i>.</p>
 
761
 
 
762
 
 
763
<h3 class="fn"><a name="setButtonText" />QMessageBox.setButtonText (<i>self</i>, int, QString)</h3><h3 class="fn"><a name="setDefaultButton" />QMessageBox.setDefaultButton (<i>self</i>, <a href="qpushbutton.html">QPushButton</a>)</h3><p>Sets the message box's <a href="qpushbutton.html#default-prop">default button</a> to
 
764
<i>button</i>.</p>
307
765
<p>This function was introduced in Qt 4.2.</p>
308
766
<p>See also <a href="qmessagebox.html#defaultButton">defaultButton</a>(), <a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qpushbutton.html#default-prop">QPushButton.setDefault</a>().</p>
309
 
<h3 class="fn"><a name="setDefaultButton-2" />QMessageBox.setDefaultButton (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Sets the message box's <a href="qpushbutton.html#default-prop">default button</a> to <i>button</i>.</p>
 
767
 
 
768
 
 
769
<h3 class="fn"><a name="setDefaultButton-2" />QMessageBox.setDefaultButton (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Sets the message box's <a href="qpushbutton.html#default-prop">default button</a> to
 
770
<i>button</i>.</p>
310
771
<p>This function was introduced in Qt 4.3.</p>
311
 
<p>See also <a href="qmessagebox.html#addButton">addButton</a>() and <a href="qpushbutton.html#default-prop">QPushButton.setDefault</a>().</p>
312
 
<a name="//apple_ref/cpp/instm/QMessageBox/setEscapeButton" />
313
 
<h3 class="fn"><a name="setDetailedText" />QMessageBox.setDetailedText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setEscapeButton" />QMessageBox.setEscapeButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Sets the button that gets activated when the <b>Escape</b> key is pressed to <i>button</i>.</p>
 
772
<p>See also <a href="qmessagebox.html#addButton">addButton</a>()
 
773
and <a href="qpushbutton.html#default-prop">QPushButton.setDefault</a>().</p>
 
774
 
 
775
 
 
776
<h3 class="fn"><a name="setDetailedText" />QMessageBox.setDetailedText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setEscapeButton" />QMessageBox.setEscapeButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Sets the button that gets activated when the <b>Escape</b> key
 
777
is pressed to <i>button</i>.</p>
314
778
<p>This function was introduced in Qt 4.2.</p>
315
779
<p>See also <a href="qmessagebox.html#escapeButton">escapeButton</a>(), <a href="qmessagebox.html#addButton">addButton</a>(), and <a href="qmessagebox.html#clickedButton">clickedButton</a>().</p>
316
 
<h3 class="fn"><a name="setEscapeButton-2" />QMessageBox.setEscapeButton (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Sets the buttons that gets activated when the <b>Escape</b> key is pressed to <i>button</i>.</p>
 
780
 
 
781
 
 
782
<h3 class="fn"><a name="setEscapeButton-2" />QMessageBox.setEscapeButton (<i>self</i>, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>)</h3><p>Sets the buttons that gets activated when the <b>Escape</b> key
 
783
is pressed to <i>button</i>.</p>
317
784
<p>This function was introduced in Qt 4.3.</p>
318
 
<p>See also <a href="qmessagebox.html#addButton">addButton</a>() and <a href="qmessagebox.html#clickedButton">clickedButton</a>().</p>
319
 
<a name="//apple_ref/cpp/instm/QMessageBox/setVisible" />
 
785
<p>See also <a href="qmessagebox.html#addButton">addButton</a>()
 
786
and <a href="qmessagebox.html#clickedButton">clickedButton</a>().</p>
 
787
 
 
788
 
320
789
<h3 class="fn"><a name="setIcon" />QMessageBox.setIcon (<i>self</i>, <a href="qmessagebox.html#Icon-enum">Icon</a>)</h3><h3 class="fn"><a name="setIconPixmap" />QMessageBox.setIconPixmap (<i>self</i>, <a href="qpixmap.html">QPixmap</a>)</h3><h3 class="fn"><a name="setInformativeText" />QMessageBox.setInformativeText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setStandardButtons" />QMessageBox.setStandardButtons (<i>self</i>, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>)</h3><h3 class="fn"><a name="setText" />QMessageBox.setText (<i>self</i>, QString)</h3><h3 class="fn"><a name="setTextFormat" />QMessageBox.setTextFormat (<i>self</i>, <a href="qt.html#TextFormat-enum">Qt.TextFormat</a>)</h3><h3 class="fn"><a name="setWindowModality" />QMessageBox.setWindowModality (<i>self</i>, <a href="qt.html#WindowModality-enum">Qt.WindowModality</a>)</h3><p>This function shadows <a href="qwidget.html#windowModality-prop">QWidget.setWindowModality</a>().</p>
321
 
<p>Sets the modality of the message box to <i>windowModality</i>.</p>
322
 
<p>On Mac OS X, if the modality is set to <a href="qt.html#WindowModality-enum">Qt.WindowModal</a> and the message box has a parent, then the message box will be a <a href="qt.html#WindowType-enum">Qt.Sheet</a>, otherwise the message box will be a standard dialog.</p>
 
790
<p>Sets the modality of the message box to
 
791
<i>windowModality</i>.</p>
 
792
<p>On Mac OS X, if the modality is set to <a href="qt.html#WindowModality-enum">Qt.WindowModal</a> and the message
 
793
box has a parent, then the message box will be a <a href="qt.html#WindowType-enum">Qt.Sheet</a>, otherwise the message box
 
794
will be a standard dialog.</p>
323
795
<p>This function was introduced in Qt 4.2.</p>
324
 
<a name="//apple_ref/cpp/instm/QMessageBox/setWindowTitle" />
 
796
 
 
797
 
325
798
<h3 class="fn"><a name="setWindowTitle" />QMessageBox.setWindowTitle (<i>self</i>, QString)</h3><p>This function shadows <a href="qwidget.html#windowTitle-prop">QWidget.setWindowTitle</a>().</p>
326
 
<p>Sets the title of the message box to <i>title</i>. On Mac OS X, the window title is ignored (as required by the Mac OS X Guidelines).</p>
 
799
<p>Sets the title of the message box to <i>title</i>. On Mac OS X,
 
800
the window title is ignored (as required by the Mac OS X
 
801
Guidelines).</p>
327
802
<p>This function was introduced in Qt 4.2.</p>
328
 
<a name="//apple_ref/cpp/instm/QMessageBox/showEvent" />
 
803
 
 
804
 
329
805
<h3 class="fn"><a name="showEvent" />QMessageBox.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p>
330
 
<a name="//apple_ref/cpp/instm/QMessageBox/standardButton" />
331
 
<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QMessageBox.sizeHint (<i>self</i>)</h3><h3 class="fn"><a name="standardButton" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.standardButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Returns the standard button enum value corresponding to the given <i>button</i>, or <a href="qmessagebox.html#StandardButton-enum">NoButton</a> if the given <i>button</i> isn't a standard button.</p>
332
 
<p>This function was introduced in Qt 4.2.</p>
333
 
<p>See also <a href="qmessagebox.html#button">button</a>() and <a href="qmessagebox.html#standardButtons-prop">standardButtons</a>().</p>
334
 
<a name="//apple_ref/cpp/clm/QMessageBox/warning" />
335
 
<h3 class="fn"><a name="standardButtons" /><a href="qmessagebox-standardbuttons.html">StandardButtons</a> QMessageBox.standardButtons (<i>self</i>)</h3><h3 class="fn"><a name="standardIcon" /><a href="qpixmap.html">QPixmap</a> QMessageBox.standardIcon (<a href="qmessagebox.html#Icon-enum">Icon</a>)</h3><h3 class="fn"><a name="text" />QString QMessageBox.text (<i>self</i>)</h3><h3 class="fn"><a name="textFormat" /><a href="qt.html#TextFormat-enum">Qt.TextFormat</a> QMessageBox.textFormat (<i>self</i>)</h3><h3 class="fn"><a name="warning" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a warning message box with the specified <i>title</i> and <i>text</i>. The standard <i>buttons</i> are added to the message box. <i>defaultButton</i> specifies the button used when <b>Enter</b> is pressed. <i>defaultButton</i> must refer to a button that was given in <i>buttons</i>. If <i>defaultButton</i> is <a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>, <a href="qmessagebox.html">QMessageBox</a> chooses a suitable default automatically.</p>
336
 
<p>Returns the identity of the standard button that was clicked. If <b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is returned.</p>
337
 
<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>
338
 
<p>This function was introduced in Qt 4.2.</p>
339
 
<p>See also <a href="qmessagebox.html#question">question</a>(), <a href="qmessagebox.html#information">information</a>(), and <a href="qmessagebox.html#critical">critical</a>().</p>
340
 
<p /><h3 class="fn"><a name="warning-2" />int QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="warning-3" />int QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="buttonClicked" />void buttonClicked (QAbstractButton *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever a button is clicked inside the <a href="qmessagebox.html">QMessageBox</a>. The button that was clicked in returned in <i>button</i>.</p>
341
 
<a name="//apple_ref/cpp/instm/QMessageBox/buttonRole" />
342
 
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
806
 
 
807
 
 
808
<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QMessageBox.sizeHint (<i>self</i>)</h3><h3 class="fn"><a name="standardButton" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.standardButton (<i>self</i>, <a href="qabstractbutton.html">QAbstractButton</a>)</h3><p>Returns the standard button enum value corresponding to the
 
809
given <i>button</i>, or <a href="qmessagebox.html#StandardButton-enum">NoButton</a> if the given
 
810
<i>button</i> isn't a standard button.</p>
 
811
<p>This function was introduced in Qt 4.2.</p>
 
812
<p>See also <a href="qmessagebox.html#button">button</a>() and
 
813
<a href="qmessagebox.html#standardButtons-prop">standardButtons</a>().</p>
 
814
 
 
815
 
 
816
<h3 class="fn"><a name="standardButtons" /><a href="qmessagebox-standardbuttons.html">StandardButtons</a> QMessageBox.standardButtons (<i>self</i>)</h3><h3 class="fn"><a name="standardIcon" /><a href="qpixmap.html">QPixmap</a> QMessageBox.standardIcon (<a href="qmessagebox.html#Icon-enum">Icon</a>)</h3><h3 class="fn"><a name="text" />QString QMessageBox.text (<i>self</i>)</h3><h3 class="fn"><a name="textFormat" /><a href="qt.html#TextFormat-enum">Qt.TextFormat</a> QMessageBox.textFormat (<i>self</i>)</h3><h3 class="fn"><a name="warning" /><a href="qmessagebox.html#StandardButton-enum">StandardButton</a> QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, <a href="qmessagebox-standardbuttons.html">StandardButtons</a>&#160;<i>buttons</i>&#160;=&#160;QMessageBox.Ok, <a href="qmessagebox.html#StandardButton-enum">StandardButton</a>&#160;<i>defaultButton</i>&#160;=&#160;QMessageBox.NoButton)</h3><p>Opens a warning message box with the specified <i>title</i> and
 
817
<i>text</i>. The standard <i>buttons</i> are added to the message
 
818
box. <i>defaultButton</i> specifies the button used when
 
819
<b>Enter</b> is pressed. <i>defaultButton</i> must refer to a
 
820
button that was given in <i>buttons</i>. If <i>defaultButton</i> is
 
821
<a href="qmessagebox.html#StandardButton-enum">QMessageBox.NoButton</a>,
 
822
<a href="qmessagebox.html">QMessageBox</a> chooses a suitable
 
823
default automatically.</p>
 
824
<p>Returns the identity of the standard button that was clicked. If
 
825
<b>Esc</b> was pressed instead, the <a href="qmessagebox.html#default-and-escape-keys">escape button</a> is
 
826
returned.</p>
 
827
<p>If <i>parent</i> is 0, the message box is an <a href="qt.html#WindowModality-enum">application modal</a> dialog box. If
 
828
<i>parent</i> is a widget, the message box is <a href="qt.html#WindowModality-enum">window modal</a> relative to
 
829
<i>parent</i>.</p>
 
830
<p>This function was introduced in Qt 4.2.</p>
 
831
<p>See also <a href="qmessagebox.html#question">question</a>(),
 
832
<a href="qmessagebox.html#information">information</a>(), and
 
833
<a href="qmessagebox.html#critical">critical</a>().</p>
 
834
<h3 class="fn"><a name="warning-2" />int QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, int, int, int&#160;<i>button2</i>&#160;=&#160;0)</h3><h3 class="fn"><a name="warning-3" />int QMessageBox.warning (<a href="qwidget.html">QWidget</a>, QString, QString, QString, QString&#160;<i>button1Text</i>&#160;=&#160;QString(), QString&#160;<i>button2Text</i>&#160;=&#160;QString(), int&#160;<i>defaultButtonNumber</i>&#160;=&#160;0, int&#160;<i>escapeButtonNumber</i>&#160;=&#160;-1)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="buttonClicked" />void buttonClicked (QAbstractButton *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever a button is clicked inside the
 
835
<a href="qmessagebox.html">QMessageBox</a>. The button that was
 
836
clicked in returned in <i>button</i>.</p>
 
837
 
 
838
 
 
839
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'