Qt:Документация 4.3.2/qerrormessage

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QErrorMessage Class Reference
[модуль QtGui ]

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

 #include <QErrorMessage>

Inherits QDialog.

[править] Открытые функции

  • 5 открытых функций унаследованных от QDialog
  • 201 открытых функций унаследованных от QWidget
  • 29 открытых функций унаследованных от QObject
  • 12 открытых функций унаследованных от QPaintDevice

[править] Открытые слоты

  • 4 открытых слотов унаследованных от QDialog
  • 19 открытых слотов унаследованных от QWidget
  • 1 открытый слот унаследованный от QObject

[править] Статические открытые члены

  • 4 статических открытых члена унаследованных от QWidget
  • 5 статических открытых члена унаследованных от QObject

[править] Дополнительные унаследованные члены

  • 2 свойства унаследованных от QDialog
  • 56 свойства унаследованных от QWidget
  • 1 свойство унаследованное от QObject
  • 3 сигнала унаследованных от QDialog
  • 1 сигнал унаследованный от QWidget
  • 1 сигнал унаследованный от QObject
  • 38 защищенных функций унаследованных от QWidget
  • 7 защищенных функций унаследованных от QObject
  • 1 защищенная функция унаследованна от QPaintDevice
  • 1 защищенный слот унаследованный от QWidget

[править] Подробное описание

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.

The static qtHandler() function installs a message handler using qInstallMsgHandler() and creates a QErrorMessage that displays qDebug(), qWarning() and qFatal() messages. This is most useful in environments where no console is available to display warnings and error 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.

Файл:Qerrormessage.png

See also QMessageBox, QStatusBar::showMessage(), and Standard Dialogs Example.


[править] Описание функций-членов

[править]
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.


Copyright © 2007 Trolltech Trademarks
Qt 4.3.2