Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# Obsolete Members for QMessageBox

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

QMessageBox class reference

### Static Public Members

- int message ( const QString & caption, const QString & text, const QString & buttonText = QString(), QWidget * parent = 0, const char * name = 0 ) `(obsolete)`
- bool query ( const QString & caption, const QString & text, const QString & yesButtonText = QString(), const QString & noButtonText = QString(), QWidget * parent = 0, const char * name = 0 ) `(obsolete)`
- QPixmap standardIcon ( Icon icon, Qt::GUIStyle style ) `(obsolete)`

## Member Function Documentation

### int QMessageBox::message ( const QString & caption, const QString & text, const QString & buttonText = QString(), QWidget * parent = 0, const char * name = 0 ) `[static]`

Opens a modal message box with the given caption and showing the given text. The message box has a single button which has the given buttonText (or tr("OK")). The message box is centred over its parent and is called name.

Use information(), warning(), question(), or critical() instead.

### bool QMessageBox::query ( const QString & caption, const QString & text, const QString & yesButtonText = QString(), const QString & noButtonText = QString(), QWidget * parent = 0, const char * name = 0 ) `[static]`

Queries the user using a modal message box with up to two buttons. The message box has the given caption (although some window managers don't show it), and shows the given text. The left button has the yesButtonText (or tr("OK")), and the right button has the noButtonText (or isn't shown). The message box is centred over its parent and is called name.

Use information(), question(), warning(), or critical() instead.

### QPixmap QMessageBox::standardIcon ( Icon icon, Qt::GUIStyle style ) `[static]`

Returns the pixmap used for a standard icon. This allows the pixmaps to be used in more complex message boxes. icon specifies the required icon, e.g. QMessageBox::Information, QMessageBox::Warning or QMessageBox::Critical.

style is unused.