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

# QErrorMessage Class Reference

The QErrorMessage class provides an error message display dialog. More...

    #include <QErrorMessage>

Part of the QtGui module.

Inherits QDialog.

- List of all members, including inherited members
- Qt 3 support members

### Public Functions

- QErrorMessage ( QWidget * parent = 0 )
- ~QErrorMessage ()

- 9 public functions inherited from QDialog
- 183 public functions inherited from QWidget
- 28 public functions inherited from QObject
- 10 public functions inherited from QPaintDevice

### Public Slots

- void showMessage ( const QString & message )

- 5 public slots inherited from QDialog
- 17 public slots inherited from QWidget
- 1 public slot inherited from QObject

### Static Public Members

- QErrorMessage * qtHandler ()

- 4 static public members inherited from QWidget
- 4 static public members inherited from QObject

### Additional Inherited Members

- 2 properties inherited from QDialog
- 52 properties inherited from QWidget
- 1 property inherited from QObject
- 1 signal inherited from QWidget
- 1 signal inherited from QObject
- 39 protected functions inherited from QWidget
- 7 protected functions inherited from QObject

## Detailed Description

The QErrorMessage class provides an error message display dialog.

An error message widget consists of a text label and a checkbox. The checkbox lets the user control whether the same error message will be displayed again in the future, typically displaying the text, "Show this message again" translated into the appropriate local language.

For production applications, the class can be used to display messages which the user only needs to see once. To use QErrorMessage like this, you create the dialog in the usual way, and show it by calling the showMessage() slot or connecting signals to it.

For Qt/Embedded developers, the static qtHandler() installs a message handler using qInstallMsgHandler() and creates a QErrorMessage that displays qDebug(), qWarning() and qFatal() messages.

In both cases QErrorMessage will queue pending messages and display them in order, with each new message being shown as soon as the user has accepted the previous message. Once the user has specified that a message is not to be shown again it is automatically skipped, and the dialog will show the next appropriate message in the queue.

The Standard Dialogs example shows how to use QErrorMessage as well as other built-in Qt dialogs.

See also QMessageBox and QStatusBar::showMessage().

## Member Function Documentation

### QErrorMessage::QErrorMessage ( QWidget * parent = 0 )

Constructs and installs an error handler window with the given parent.

### QErrorMessage::~QErrorMessage ()

Destroys the error message dialog.

### QErrorMessage * QErrorMessage::qtHandler () `[static]`

Returns a pointer to a QErrorMessage object that outputs the default Qt messages. This function creates such an object, if there isn't one already.

### void QErrorMessage::showMessage ( const QString & message ) `[slot]`

Shows the given message, and returns immediately. This function does nothing if the user has requested that message should not be shown again.

Normally, message is shown at once, but if there are pending messages, message is queued for later display.