[][src]Struct qt_widgets::QMessageBox

#[repr(C)]pub struct QMessageBox { /* fields omitted */ }

The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.

C++ class: QMessageBox.

C++ documentation:

The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.

A message box displays a primary text to alert the user to a situation, an informative text to further explain the alert or to ask the user a question, and an optional detailed text to provide even more data if the user requests it. A message box can also display an icon and standard buttons for accepting a user response.

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.

Methods

impl QMessageBox[src]

pub fn button_clicked(&self) -> Signal<(*mut QAbstractButton,)>[src]

This signal is emitted whenever a button is clicked inside the QMessageBox. The button that was clicked in returned in button.

Returns a built-in Qt signal QMessageBox::buttonClicked that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever a button is clicked inside the QMessageBox. The button that was clicked in returned in button.

pub unsafe fn about(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
)
[src]

Displays a simple about box with title title and text text. The about box's parent is parent.

Calls C++ function: static void QMessageBox::about(QWidget* parent, const QString& title, const QString& text).

C++ documentation:

Displays a simple about box with title title and text text. The about box's parent is parent.

about() looks for a suitable icon in four locations:

  1. It prefers parent->icon() if that exists.
  2. If not, it tries the top-level widget containing parent.
  3. If that fails, it tries the active window.
  4. As a last resort it uses the Information icon.

The about box has a single button labelled "OK". On macOS, the about box is popped up as a modeless window; on other platforms, it is currently application modal.

See also QWidget::windowIcon() and QApplication::activeWindow().

pub unsafe fn about_qt_2a(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>
)
[src]

Displays a simple message box about Qt, with the given title and centered over parent (if parent is not 0). The message includes the version number of Qt being used by the application.

Calls C++ function: static void QMessageBox::aboutQt(QWidget* parent, const QString& title = …).

C++ documentation:

Displays a simple message box about Qt, with the given title and centered over parent (if parent is not 0). The message includes the version number of Qt being used by the application.

This is useful for inclusion in the Help menu of an application, as shown in the Menus example.

QApplication provides this functionality as a slot.

On macOS, the about box is popped up as a modeless window; on other platforms, it is currently application modal.

See also QApplication::aboutQt().

pub unsafe fn about_qt_1a(parent: impl CastInto<Ptr<QWidget>>)[src]

Displays a simple message box about Qt, with the given title and centered over parent (if parent is not 0). The message includes the version number of Qt being used by the application.

Calls C++ function: static void QMessageBox::aboutQt(QWidget* parent).

C++ documentation:

Displays a simple message box about Qt, with the given title and centered over parent (if parent is not 0). The message includes the version number of Qt being used by the application.

This is useful for inclusion in the Help menu of an application, as shown in the Menus example.

QApplication provides this functionality as a slot.

On macOS, the about box is popped up as a modeless window; on other platforms, it is currently application modal.

See also QApplication::aboutQt().

pub unsafe fn add_button_q_abstract_button_button_role(
    &self,
    button: impl CastInto<Ptr<QAbstractButton>>,
    role: ButtonRole
)
[src]

Adds the given button to the message box with the specified role.

Calls C++ function: void QMessageBox::addButton(QAbstractButton* button, QMessageBox::ButtonRole role).

C++ documentation:

Adds the given button to the message box with the specified role.

This function was introduced in Qt 4.2.

See also removeButton(), button(), and setStandardButtons().

pub unsafe fn add_button_q_string_button_role(
    &self,
    text: impl CastInto<Ref<QString>>,
    role: ButtonRole
) -> QPtr<QPushButton>
[src]

This is an overloaded function.

Calls C++ function: QPushButton* QMessageBox::addButton(const QString& text, QMessageBox::ButtonRole role).

C++ documentation:

This is an overloaded function.

Creates a button with the given text, adds it to the message box for the specified role, and returns it.

This function was introduced in Qt 4.2.

pub unsafe fn add_button_standard_button(
    &self,
    button: StandardButton
) -> QPtr<QPushButton>
[src]

This is an overloaded function.

Calls C++ function: QPushButton* QMessageBox::addButton(QMessageBox::StandardButton button).

C++ documentation:

This is an overloaded function.

Adds a standard button to the message box if it is valid to do so, and returns the push button.

This function was introduced in Qt 4.2.

See also setStandardButtons().

pub unsafe fn button(&self, which: StandardButton) -> QPtr<QAbstractButton>[src]

Returns a pointer corresponding to the standard button which, or 0 if the standard button doesn't exist in this message box.

Calls C++ function: QAbstractButton* QMessageBox::button(QMessageBox::StandardButton which) const.

C++ documentation:

Returns a pointer corresponding to the standard button which, or 0 if the standard button doesn't exist in this message box.

This function was introduced in Qt 4.2.

See also standardButtons and standardButton().

pub unsafe fn button_role(
    &self,
    button: impl CastInto<Ptr<QAbstractButton>>
) -> ButtonRole
[src]

Returns the button role for the specified button. This function returns InvalidRole if button is 0 or has not been added to the message box.

Calls C++ function: QMessageBox::ButtonRole QMessageBox::buttonRole(QAbstractButton* button) const.

C++ documentation:

Returns the button role for the specified button. This function returns InvalidRole if button is 0 or has not been added to the message box.

This function was introduced in Qt 4.5.

See also buttons() and addButton().

pub unsafe fn button_text(&self, button: c_int) -> CppBox<QString>[src]

Returns the text of the message box button button, or an empty string if the message box does not contain the button.

Calls C++ function: QString QMessageBox::buttonText(int button) const.

C++ documentation:

Returns the text of the message box button button, or an empty string if the message box does not contain the button.

Use button() and QPushButton::text() instead.

See also setButtonText().

pub unsafe fn buttons(&self) -> CppBox<QListOfQAbstractButton>[src]

Returns a list of all the buttons that have been added to the message box.

Calls C++ function: QList<QAbstractButton*> QMessageBox::buttons() const.

C++ documentation:

Returns a list of all the buttons that have been added to the message box.

This function was introduced in Qt 4.5.

See also buttonRole(), addButton(), and removeButton().

pub unsafe fn check_box(&self) -> QPtr<QCheckBox>[src]

Returns the checkbox shown on the dialog. This is 0 if no checkbox is set.

Calls C++ function: QCheckBox* QMessageBox::checkBox() const.

C++ documentation:

Returns the checkbox shown on the dialog. This is 0 if no checkbox is set.

This function was introduced in Qt 5.2.

See also setCheckBox().

pub unsafe fn clicked_button(&self) -> QPtr<QAbstractButton>[src]

Returns the button that was clicked by the user, or 0 if the user hit the Esc key and no escape button was set.

Calls C++ function: QAbstractButton* QMessageBox::clickedButton() const.

C++ documentation:

Returns the button that was clicked by the user, or 0 if the user hit the Esc key and no escape button was set.

If exec() hasn't been called yet, returns 0.

Example:

QMessageBox messageBox(this); QAbstractButton *disconnectButton = messageBox.addButton(tr("Disconnect"), QMessageBox::ActionRole); ... messageBox.exec(); if (messageBox.clickedButton() == disconnectButton) { ... }

This function was introduced in Qt 4.2.

See also standardButton() and button().

pub unsafe fn critical_q_widget2_q_string_q_flags_standard_button_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    default_button: StandardButton
) -> StandardButton
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QMessageBox::StandardButton defaultButton = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget2_q_string3_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int,
    button2: c_int
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, int button0, int button1, int button2 = …).

C++ documentation:

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget5_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int,
    escape_button_number: c_int
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …, int escapeButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget2_q_string2_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: StandardButton,
    button1: StandardButton
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButton button0, QMessageBox::StandardButton button1).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget2_q_string_q_flags_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>
) -> StandardButton
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget2_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> StandardButton
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::critical(QWidget* parent, const QString& title, const QString& text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget2_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, int button0, int button1).

C++ documentation:

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget5_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget5_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget4_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn critical_q_widget3_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::critical(QWidget* parent, const QString& title, const QString& text, const QString& button0Text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a critical message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and warning().

pub unsafe fn default_button(&self) -> QPtr<QPushButton>[src]

Returns the button that should be the message box's default button. Returns 0 if no default button was set.

Calls C++ function: QPushButton* QMessageBox::defaultButton() const.

C++ documentation:

Returns the button that should be the message box's default button. Returns 0 if no default button was set.

This function was introduced in Qt 4.2.

See also setDefaultButton(), addButton(), and QPushButton::setDefault().

pub unsafe fn detailed_text(&self) -> CppBox<QString>[src]

This property holds the text to be displayed in the details area.

Calls C++ function: QString QMessageBox::detailedText() const.

C++ documentation:

This property holds the text to be displayed in the details area.

The text will be interpreted as a plain text.

By default, this property contains an empty string.

This property was introduced in Qt 4.2.

Access functions:

QString detailedText() const
void setDetailedText(const QString &text)

See also QMessageBox::text and QMessageBox::informativeText.

pub unsafe fn escape_button(&self) -> QPtr<QAbstractButton>[src]

Returns the button that is activated when escape is pressed.

Calls C++ function: QAbstractButton* QMessageBox::escapeButton() const.

C++ documentation:

Returns the button that is activated when escape is pressed.

By default, QMessageBox attempts to automatically detect an escape button as follows:

  1. If there is only one button, it is made the escape button.
  2. If there is a Cancel button, it is made the escape button.
  3. On macOS only, if there is exactly one button with the role QMessageBox::RejectRole, it is made the escape button.

When an escape button could not be automatically detected, pressing Esc has no effect.

This function was introduced in Qt 4.2.

See also setEscapeButton() and addButton().

pub unsafe fn icon(&self) -> Icon[src]

This property holds the message box's icon

Calls C++ function: QMessageBox::Icon QMessageBox::icon() const.

C++ documentation:

This property holds the message box's icon

The icon of the message box can be specified with one of the values:

The default is QMessageBox::NoIcon.

The pixmap used to display the actual icon depends on the current GUI style. You can also set a custom pixmap for the icon by setting the icon pixmap property.

Access functions:

Icon icon() const
void setIcon(Icon)

See also iconPixmap.

pub unsafe fn icon_pixmap(&self) -> CppBox<QPixmap>[src]

This property holds the current icon

Calls C++ function: QPixmap QMessageBox::iconPixmap() const.

C++ documentation:

This property holds the current icon

The icon currently used by the message box. Note that it's often hard to draw one pixmap that looks appropriate in all GUI styles; you may want to supply a different pixmap for each platform.

By default, this property is undefined.

Access functions:

QPixmap iconPixmap() const
void setIconPixmap(const QPixmap &pixmap)

See also icon.

pub unsafe fn information_q_widget2_q_string_q_flags_standard_button_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    default_button: StandardButton
) -> StandardButton
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::information(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QMessageBox::StandardButton defaultButton = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string3_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int,
    button2: c_int
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, int button0, int button1 = …, int button2 = …).

C++ documentation:

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget5_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int,
    escape_button_number: c_int
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …, int escapeButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string2_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: StandardButton,
    button1: StandardButton
) -> StandardButton
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::information(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButton button0, QMessageBox::StandardButton button1 = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string_q_flags_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>
) -> StandardButton
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::information(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> StandardButton
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::information(QWidget* parent, const QString& title, const QString& text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, int button0, int button1 = …).

C++ documentation:

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, int button0).

C++ documentation:

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget5_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget5_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget4_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget3_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::information(QWidget* parent, const QString& title, const QString& text, const QString& button0Text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn information_q_widget2_q_string_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: StandardButton
) -> StandardButton
[src]

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::information(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButton button0).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens an information message box with the given title and the text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also question(), warning(), and critical().

pub unsafe fn informative_text(&self) -> CppBox<QString>[src]

This property holds the informative text that provides a fuller description for the message

Calls C++ function: QString QMessageBox::informativeText() const.

C++ documentation:

This property holds the informative text that provides a fuller description for the message

Infromative text can be used to expand upon the text() to give more information to the user. On the Mac, this text appears in small system font below the text(). On other platforms, it is simply appended to the existing text.

By default, this property contains an empty string.

This property was introduced in Qt 4.2.

Access functions:

QString informativeText() const
void setInformativeText(const QString &text)

See also QMessageBox::text and QMessageBox::detailedText.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QMessageBox::metaObject() const.

pub unsafe fn from_q_widget(
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QMessageBox>
[src]

Constructs a message box with no text and no buttons. parent is passed to the QDialog constructor.

Calls C++ function: [constructor] void QMessageBox::QMessageBox(QWidget* parent = …).

C++ documentation:

Constructs a message box with no text and no buttons. parent is passed to the QDialog constructor.

On macOS, if you want your message box to appear as a Qt::Sheet of its parent, set the message box's window modality to Qt::WindowModal or use open(). Otherwise, the message box will be a standard dialog.

pub unsafe fn from_icon2_q_string_q_flags_standard_button_q_widget_q_flags_window_type(
    icon: Icon,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    parent: impl CastInto<Ptr<QWidget>>,
    flags: QFlags<WindowType>
) -> QBox<QMessageBox>
[src]

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

Calls C++ function: [constructor] void QMessageBox::QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QWidget* parent = …, QFlags<Qt::WindowType> flags = …).

C++ documentation:

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

The message box is an application modal dialog box.

On macOS, if parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's window modality to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog.

See also setWindowTitle(), setText(), setIcon(), and setStandardButtons().

pub unsafe fn from_2_q_string_icon3_int_q_widget_q_flags_window_type(
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    icon: Icon,
    button0: c_int,
    button1: c_int,
    button2: c_int,
    parent: impl CastInto<Ptr<QWidget>>,
    f: QFlags<WindowType>
) -> QBox<QMessageBox>
[src]

Calls C++ function: [constructor] void QMessageBox::QMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent = …, QFlags<Qt::WindowType> f = …).

pub unsafe fn new() -> QBox<QMessageBox>[src]

The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.

Calls C++ function: [constructor] void QMessageBox::QMessageBox().

C++ documentation:

The QMessageBox class provides a modal dialog for informing the user or for asking the user a question and receiving an answer.

A message box displays a primary text to alert the user to a situation, an informative text to further explain the alert or to ask the user a question, and an optional detailed text to provide even more data if the user requests it. A message box can also display an icon and standard buttons for accepting a user response.

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.

pub unsafe fn from_icon2_q_string_q_flags_standard_button_q_widget(
    icon: Icon,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QMessageBox>
[src]

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

Calls C++ function: [constructor] void QMessageBox::QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QWidget* parent = …).

C++ documentation:

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

The message box is an application modal dialog box.

On macOS, if parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's window modality to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog.

See also setWindowTitle(), setText(), setIcon(), and setStandardButtons().

pub unsafe fn from_icon2_q_string_q_flags_standard_button(
    icon: Icon,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>
) -> QBox<QMessageBox>
[src]

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

Calls C++ function: [constructor] void QMessageBox::QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …).

C++ documentation:

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

The message box is an application modal dialog box.

On macOS, if parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's window modality to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog.

See also setWindowTitle(), setText(), setIcon(), and setStandardButtons().

pub unsafe fn from_icon2_q_string(
    icon: Icon,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> QBox<QMessageBox>
[src]

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

Calls C++ function: [constructor] void QMessageBox::QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text).

C++ documentation:

Constructs a message box with the given icon, title, text, and standard buttons. Standard or custom buttons can be added at any time using addButton(). The parent and f arguments are passed to the QDialog constructor.

The message box is an application modal dialog box.

On macOS, if parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's window modality to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog.

See also setWindowTitle(), setText(), setIcon(), and setStandardButtons().

pub unsafe fn from_2_q_string_icon3_int_q_widget(
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    icon: Icon,
    button0: c_int,
    button1: c_int,
    button2: c_int,
    parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QMessageBox>
[src]

Calls C++ function: [constructor] void QMessageBox::QMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent = …).

pub unsafe fn from_2_q_string_icon3_int(
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    icon: Icon,
    button0: c_int,
    button1: c_int,
    button2: c_int
) -> QBox<QMessageBox>
[src]

Calls C++ function: [constructor] void QMessageBox::QMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2).

pub unsafe fn open(
    &self,
    receiver: impl CastInto<Ptr<QObject>>,
    member: *const c_char
)
[src]

Opens the dialog and connects its finished() or buttonClicked() signal to the slot specified by receiver and member. If the slot in member has a pointer for its first parameter the connection is to buttonClicked(), otherwise the connection is to finished().

Calls C++ function: void QMessageBox::open(QObject* receiver, const char* member).

C++ documentation:

Opens the dialog and connects its finished() or buttonClicked() signal to the slot specified by receiver and member. If the slot in member has a pointer for its first parameter the connection is to buttonClicked(), otherwise the connection is to finished().

The signal will be disconnected from the slot when the dialog is closed.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QMessageBox::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QMessageBox::qt_metacast(const char* arg1).

pub unsafe fn question_q_widget2_q_string_q_flags_standard_button_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    default_button: StandardButton
) -> StandardButton
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::question(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QMessageBox::StandardButton defaultButton = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string3_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int,
    button2: c_int
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, int button0, int button1 = …, int button2 = …).

C++ documentation:

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget5_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int,
    escape_button_number: c_int
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …, int escapeButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string2_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: StandardButton,
    button1: StandardButton
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButton button0, QMessageBox::StandardButton button1).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string_q_flags_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>
) -> StandardButton
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::question(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> StandardButton
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::question(QWidget* parent, const QString& title, const QString& text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, int button0, int button1 = …).

C++ documentation:

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget2_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, int button0).

C++ documentation:

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget5_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget5_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget4_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn question_q_widget3_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::question(QWidget* parent, const QString& title, const QString& text, const QString& button0Text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0):

Opens a question message box with the given title and text. The dialog may have up to three buttons. Each of the buttons, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Yes, or QMessageBox::No, etc.) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), warning(), and critical().

pub unsafe fn remove_button(&self, button: impl CastInto<Ptr<QAbstractButton>>)[src]

Removes button from the button box without deleting it.

Calls C++ function: void QMessageBox::removeButton(QAbstractButton* button).

C++ documentation:

Removes button from the button box without deleting it.

This function was introduced in Qt 4.2.

See also addButton() and setStandardButtons().

pub unsafe fn set_button_text(
    &self,
    button: c_int,
    text: impl CastInto<Ref<QString>>
)
[src]

Sets the text of the message box button button to text. Setting the text of a button that is not in the message box is silently ignored.

Calls C++ function: void QMessageBox::setButtonText(int button, const QString& text).

C++ documentation:

Sets the text of the message box button button to text. Setting the text of a button that is not in the message box is silently ignored.

Use addButton() instead.

See also buttonText().

pub unsafe fn set_check_box(&self, cb: impl CastInto<Ptr<QCheckBox>>)[src]

Sets the checkbox cb on the message dialog. The message box takes ownership of the checkbox. The argument cb can be 0 to remove an existing checkbox from the message box.

Calls C++ function: void QMessageBox::setCheckBox(QCheckBox* cb).

C++ documentation:

Sets the checkbox cb on the message dialog. The message box takes ownership of the checkbox. The argument cb can be 0 to remove an existing checkbox from the message box.

This function was introduced in Qt 5.2.

See also checkBox().

pub unsafe fn set_default_button_q_push_button(
    &self,
    button: impl CastInto<Ptr<QPushButton>>
)
[src]

Sets the message box's default button to button.

Calls C++ function: void QMessageBox::setDefaultButton(QPushButton* button).

C++ documentation:

Sets the message box's default button to button.

This function was introduced in Qt 4.2.

See also defaultButton(), addButton(), and QPushButton::setDefault().

pub unsafe fn set_default_button_standard_button(&self, button: StandardButton)[src]

Sets the message box's default button to button.

Calls C++ function: void QMessageBox::setDefaultButton(QMessageBox::StandardButton button).

C++ documentation:

Sets the message box's default button to button.

This function was introduced in Qt 4.3.

See also addButton() and QPushButton::setDefault().

pub unsafe fn set_detailed_text(&self, text: impl CastInto<Ref<QString>>)[src]

This property holds the text to be displayed in the details area.

Calls C++ function: void QMessageBox::setDetailedText(const QString& text).

C++ documentation:

This property holds the text to be displayed in the details area.

The text will be interpreted as a plain text.

By default, this property contains an empty string.

This property was introduced in Qt 4.2.

Access functions:

QString detailedText() const
void setDetailedText(const QString &text)

See also QMessageBox::text and QMessageBox::informativeText.

pub unsafe fn set_escape_button_q_abstract_button(
    &self,
    button: impl CastInto<Ptr<QAbstractButton>>
)
[src]

Sets the button that gets activated when the Escape key is pressed to button.

Calls C++ function: void QMessageBox::setEscapeButton(QAbstractButton* button).

C++ documentation:

Sets the button that gets activated when the Escape key is pressed to button.

This function was introduced in Qt 4.2.

See also escapeButton(), addButton(), and clickedButton().

pub unsafe fn set_escape_button_standard_button(&self, button: StandardButton)[src]

Sets the buttons that gets activated when the Escape key is pressed to button.

Calls C++ function: void QMessageBox::setEscapeButton(QMessageBox::StandardButton button).

C++ documentation:

Sets the buttons that gets activated when the Escape key is pressed to button.

This function was introduced in Qt 4.3.

See also addButton() and clickedButton().

pub unsafe fn set_icon(&self, arg1: Icon)[src]

This property holds the message box's icon

Calls C++ function: void QMessageBox::setIcon(QMessageBox::Icon arg1).

C++ documentation:

This property holds the message box's icon

The icon of the message box can be specified with one of the values:

The default is QMessageBox::NoIcon.

The pixmap used to display the actual icon depends on the current GUI style. You can also set a custom pixmap for the icon by setting the icon pixmap property.

Access functions:

Icon icon() const
void setIcon(Icon)

See also iconPixmap.

pub unsafe fn set_icon_pixmap(&self, pixmap: impl CastInto<Ref<QPixmap>>)[src]

This property holds the current icon

Calls C++ function: void QMessageBox::setIconPixmap(const QPixmap& pixmap).

C++ documentation:

This property holds the current icon

The icon currently used by the message box. Note that it's often hard to draw one pixmap that looks appropriate in all GUI styles; you may want to supply a different pixmap for each platform.

By default, this property is undefined.

Access functions:

QPixmap iconPixmap() const
void setIconPixmap(const QPixmap &pixmap)

See also icon.

pub unsafe fn set_informative_text(&self, text: impl CastInto<Ref<QString>>)[src]

This property holds the informative text that provides a fuller description for the message

Calls C++ function: void QMessageBox::setInformativeText(const QString& text).

C++ documentation:

This property holds the informative text that provides a fuller description for the message

Infromative text can be used to expand upon the text() to give more information to the user. On the Mac, this text appears in small system font below the text(). On other platforms, it is simply appended to the existing text.

By default, this property contains an empty string.

This property was introduced in Qt 4.2.

Access functions:

QString informativeText() const
void setInformativeText(const QString &text)

See also QMessageBox::text and QMessageBox::detailedText.

pub unsafe fn set_standard_buttons(&self, buttons: QFlags<StandardButton>)[src]

collection of standard buttons in the message box

Calls C++ function: void QMessageBox::setStandardButtons(QFlags<QMessageBox::StandardButton> buttons).

C++ documentation:

collection of standard buttons in the message box

This property controls which standard buttons are used by the message box.

By default, this property contains no standard buttons.

This property was introduced in Qt 4.2.

Access functions:

StandardButtons standardButtons() const
void setStandardButtons(StandardButtons buttons)

See also addButton().

pub unsafe fn set_text(&self, text: impl CastInto<Ref<QString>>)[src]

This property holds the message box text to be displayed.

Calls C++ function: void QMessageBox::setText(const QString& text).

C++ documentation:

This property holds the message box text to be displayed.

The text will be interpreted either as a plain text or as rich text, depending on the text format setting (QMessageBox::textFormat). The default setting is Qt::AutoText, i.e., the message box will try to auto-detect the format of the text.

The default value of this property is an empty string.

Access functions:

QString text() const
void setText(const QString &text)

See also textFormat, QMessageBox::informativeText, and QMessageBox::detailedText.

pub unsafe fn set_text_format(&self, format: TextFormat)[src]

This property holds the format of the text displayed by the message box

Calls C++ function: void QMessageBox::setTextFormat(Qt::TextFormat format).

C++ documentation:

This property holds the format of the text displayed by the message box

The current text format used by the message box. See the Qt::TextFormat enum for an explanation of the possible options.

The default format is Qt::AutoText.

Access functions:

Qt::TextFormat textFormat() const
void setTextFormat(Qt::TextFormat format)

See also setText().

pub unsafe fn set_text_interaction_flags(
    &self,
    flags: QFlags<TextInteractionFlag>
)
[src]

Specifies how the label of the message box should interact with user input.

Calls C++ function: void QMessageBox::setTextInteractionFlags(QFlags<Qt::TextInteractionFlag> flags).

C++ documentation:

Specifies how the label of the message box should interact with user input.

The default value depends on the style.

This property was introduced in Qt 5.1.

Access functions:

Qt::TextInteractionFlags textInteractionFlags() const
void setTextInteractionFlags(Qt::TextInteractionFlags flags)

See also QStyle::SH_MessageBox_TextInteractionFlags.

pub unsafe fn set_window_modality(&self, window_modality: WindowModality)[src]

This function shadows QWidget::setWindowModality().

Calls C++ function: void QMessageBox::setWindowModality(Qt::WindowModality windowModality).

C++ documentation:

This function shadows QWidget::setWindowModality().

Sets the modality of the message box to windowModality.

On macOS, if the modality is set to Qt::WindowModal and the message box has a parent, then the message box will be a Qt::Sheet, otherwise the message box will be a standard dialog.

This function was introduced in Qt 4.2.

pub unsafe fn set_window_title(&self, title: impl CastInto<Ref<QString>>)[src]

This function shadows QWidget::setWindowTitle().

Calls C++ function: void QMessageBox::setWindowTitle(const QString& title).

C++ documentation:

This function shadows QWidget::setWindowTitle().

Sets the title of the message box to title. On macOS, the window title is ignored (as required by the macOS Guidelines).

This function was introduced in Qt 4.2.

pub unsafe fn standard_button(
    &self,
    button: impl CastInto<Ptr<QAbstractButton>>
) -> StandardButton
[src]

Returns the standard button enum value corresponding to the given button, or NoButton if the given button isn't a standard button.

Calls C++ function: QMessageBox::StandardButton QMessageBox::standardButton(QAbstractButton* button) const.

C++ documentation:

Returns the standard button enum value corresponding to the given button, or NoButton if the given button isn't a standard button.

This function was introduced in Qt 4.2.

See also button() and standardButtons().

pub unsafe fn standard_buttons(&self) -> QFlags<StandardButton>[src]

collection of standard buttons in the message box

Calls C++ function: QFlags<QMessageBox::StandardButton> QMessageBox::standardButtons() const.

C++ documentation:

collection of standard buttons in the message box

This property controls which standard buttons are used by the message box.

By default, this property contains no standard buttons.

This property was introduced in Qt 4.2.

Access functions:

StandardButtons standardButtons() const
void setStandardButtons(StandardButtons buttons)

See also addButton().

pub unsafe fn standard_icon(icon: Icon) -> CppBox<QPixmap>[src]

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::Question, QMessageBox::Information, QMessageBox::Warning or QMessageBox::Critical.

Calls C++ function: static QPixmap QMessageBox::standardIcon(QMessageBox::Icon icon).

C++ documentation:

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::Question, QMessageBox::Information, QMessageBox::Warning or QMessageBox::Critical.

Call QStyle::standardIcon() with QStyle::SP_MessageBoxInformation etc. instead.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn text(&self) -> CppBox<QString>[src]

This property holds the message box text to be displayed.

Calls C++ function: QString QMessageBox::text() const.

C++ documentation:

This property holds the message box text to be displayed.

The text will be interpreted either as a plain text or as rich text, depending on the text format setting (QMessageBox::textFormat). The default setting is Qt::AutoText, i.e., the message box will try to auto-detect the format of the text.

The default value of this property is an empty string.

Access functions:

QString text() const
void setText(const QString &text)

See also textFormat, QMessageBox::informativeText, and QMessageBox::detailedText.

pub unsafe fn text_format(&self) -> TextFormat[src]

This property holds the format of the text displayed by the message box

Calls C++ function: Qt::TextFormat QMessageBox::textFormat() const.

C++ documentation:

This property holds the format of the text displayed by the message box

The current text format used by the message box. See the Qt::TextFormat enum for an explanation of the possible options.

The default format is Qt::AutoText.

Access functions:

Qt::TextFormat textFormat() const
void setTextFormat(Qt::TextFormat format)

See also setText().

pub unsafe fn text_interaction_flags(&self) -> QFlags<TextInteractionFlag>[src]

Specifies how the label of the message box should interact with user input.

Calls C++ function: QFlags<Qt::TextInteractionFlag> QMessageBox::textInteractionFlags() const.

C++ documentation:

Specifies how the label of the message box should interact with user input.

The default value depends on the style.

This property was introduced in Qt 5.1.

Access functions:

Qt::TextInteractionFlags textInteractionFlags() const
void setTextInteractionFlags(Qt::TextInteractionFlags flags)

See also QStyle::SH_MessageBox_TextInteractionFlags.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QMessageBox::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QMessageBox::trUtf8(const char* s, const char* c, int n).

pub unsafe fn warning_q_widget2_q_string_q_flags_standard_button_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>,
    default_button: StandardButton
) -> StandardButton
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …, QMessageBox::StandardButton defaultButton = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget2_q_string3_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int,
    button2: c_int
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, int button0, int button1, int button2 = …).

C++ documentation:

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget5_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int,
    escape_button_number: c_int
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …, int escapeButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget2_q_string2_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: StandardButton,
    button1: StandardButton
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButton button0, QMessageBox::StandardButton button1).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget2_q_string_q_flags_standard_button(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    buttons: QFlags<StandardButton>
) -> StandardButton
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, QFlags<QMessageBox::StandardButton> buttons = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget2_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>
) -> StandardButton
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static QMessageBox::StandardButton QMessageBox::warning(QWidget* parent, const QString& title, const QString& text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget2_q_string2_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0: c_int,
    button1: c_int
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, int button0, int button1).

C++ documentation:

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget5_q_string_int(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>,
    default_button_number: c_int
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …, int defaultButtonNumber = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget5_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>,
    button2_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …, const QString& button2Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget4_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>,
    button1_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, const QString& button0Text, const QString& button1Text = …).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

pub unsafe fn warning_q_widget3_q_string(
    parent: impl CastInto<Ptr<QWidget>>,
    title: impl CastInto<Ref<QString>>,
    text: impl CastInto<Ref<QString>>,
    button0_text: impl CastInto<Ref<QString>>
) -> c_int
[src]

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

Calls C++ function: static int QMessageBox::warning(QWidget* parent, const QString& title, const QString& text, const QString& button0Text).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for static int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0):

Opens a warning message box with the given title and text. The dialog may have up to three buttons. Each of the button parameters, button0, button1 and button2 may be set to one of the following values:

If you don't want all three buttons, set the last button, or last two buttons to QMessageBox::NoButton.

One button can be OR-ed with QMessageBox::Default, and one button can be OR-ed with QMessageBox::Escape.

Returns the identity (QMessageBox::Ok or QMessageBox::No or ...) of the button that was clicked.

The message box is an application modal dialog box.

Warning: Do not delete parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox constructors.

See also information(), question(), and critical().

Methods from Deref<Target = QDialog>

pub fn finished(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Returns a built-in Qt signal QDialog::finished that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog's result code has been set, either by the user or by calling done(), accept(), or reject().

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also accepted() and rejected().

pub fn accepted(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Returns a built-in Qt signal QDialog::accepted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been accepted either by the user or by calling accept() or done() with the QDialog::Accepted argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and rejected().

pub fn rejected(&self) -> Signal<()>[src]

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Returns a built-in Qt signal QDialog::rejected that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the dialog has been rejected either by the user or by calling reject() or done() with the QDialog::Rejected argument.

Note that this signal is not emitted when hiding the dialog with hide() or setVisible(false). This includes deleting the dialog while it is visible.

This function was introduced in Qt 4.1.

See also finished() and accepted().

pub fn slot_open(&self) -> Receiver<()>[src]

Shows the dialog as a window modal dialog, returning immediately.

Returns a built-in Qt slot QDialog::open that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub fn slot_exec(&self) -> Receiver<()>[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Returns a built-in Qt slot QDialog::exec that can be passed to qt_core::Signal::connect.

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub fn slot_done(&self) -> Receiver<(c_int,)>[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Returns a built-in Qt slot QDialog::done that can be passed to qt_core::Signal::connect.

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub fn slot_accept(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Accepted.

Returns a built-in Qt slot QDialog::accept that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub fn slot_reject(&self) -> Receiver<()>[src]

Hides the modal dialog and sets the result code to Rejected.

Returns a built-in Qt slot QDialog::reject that can be passed to qt_core::Signal::connect.

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub fn slot_show_extension(&self) -> Receiver<(bool,)>[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Returns a built-in Qt slot QDialog::showExtension that can be passed to qt_core::Signal::connect.

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn accept(&self)[src]

Hides the modal dialog and sets the result code to Accepted.

Calls C++ function: virtual [slot] void QDialog::accept().

C++ documentation:

Hides the modal dialog and sets the result code to Accepted.

See also reject() and done().

pub unsafe fn done(&self, arg1: c_int)[src]

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

Calls C++ function: virtual [slot] void QDialog::done(int arg1).

C++ documentation:

Closes the dialog and sets its result code to r. If this dialog is shown with exec(), done() causes the local event loop to finish, and exec() to return r.

As with QWidget::close(), done() deletes the dialog if the Qt::WA_DeleteOnClose flag is set. If the dialog is the application's main widget, the application terminates. If the dialog is the last window closed, the QApplication::lastWindowClosed() signal is emitted.

See also accept(), reject(), QApplication::activeWindow(), and QCoreApplication::quit().

pub unsafe fn exec(&self) -> c_int[src]

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

Calls C++ function: virtual [slot] int QDialog::exec().

C++ documentation:

Shows the dialog as a modal dialog, blocking until the user closes it. The function returns a DialogCode result.

If the dialog is application modal, users cannot interact with any other window in the same application until they close the dialog. If the dialog is window modal, only interaction with the parent window is blocked while the dialog is open. By default, the dialog is application modal.

See also open(), show(), result(), and setWindowModality().

pub unsafe fn extension(&self) -> QPtr<QWidget>[src]

Returns the dialog's extension or 0 if no extension has been defined.

Calls C++ function: QWidget* QDialog::extension() const.

C++ documentation:

Returns the dialog's extension or 0 if no extension has been defined.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setExtension(), showExtension(), and setOrientation().

pub unsafe fn is_size_grip_enabled(&self) -> bool[src]

This property holds whether the size grip is enabled

Calls C++ function: bool QDialog::isSizeGripEnabled() const.

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDialog::metaObject() const.

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QDialog::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn open(&self)[src]

Shows the dialog as a window modal dialog, returning immediately.

Calls C++ function: virtual [slot] void QDialog::open().

C++ documentation:

Shows the dialog as a window modal dialog, returning immediately.

This function was introduced in Qt 4.5.

See also exec(), show(), result(), and setWindowModality().

pub unsafe fn orientation(&self) -> Orientation[src]

Returns the dialog's extension orientation.

Calls C++ function: Qt::Orientation QDialog::orientation() const.

C++ documentation:

Returns the dialog's extension orientation.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also setOrientation() and extension().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QDialog::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QDialog::qt_metacast(const char* arg1).

pub unsafe fn reject(&self)[src]

Hides the modal dialog and sets the result code to Rejected.

Calls C++ function: virtual [slot] void QDialog::reject().

C++ documentation:

Hides the modal dialog and sets the result code to Rejected.

See also accept() and done().

pub unsafe fn result(&self) -> c_int[src]

In general returns the modal dialog's result code, Accepted or Rejected.

Calls C++ function: int QDialog::result() const.

C++ documentation:

In general returns the modal dialog's result code, Accepted or Rejected.

Note: When called on a QMessageBox instance, the returned value is a value of the QMessageBox::StandardButton enum.

Do not call this function if the dialog was constructed with the Qt::WA_DeleteOnClose attribute.

See also setResult().

pub unsafe fn set_extension(&self, extension: impl CastInto<Ptr<QWidget>>)[src]

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Calls C++ function: void QDialog::setExtension(QWidget* extension).

C++ documentation:

Sets the widget, extension, to be the dialog's extension, deleting any previous extension. The dialog takes ownership of the extension. Note that if 0 is passed any existing extension will be deleted. This function must only be called while the dialog is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also extension(), showExtension(), and setOrientation().

pub unsafe fn set_modal(&self, modal: bool)[src]

This property holds whether show() should pop up the dialog as modal or modeless

Calls C++ function: void QDialog::setModal(bool modal).

C++ documentation:

This property holds whether show() should pop up the dialog as modal or modeless

By default, this property is false and show() pops up the dialog as modeless. Setting this property to true is equivalent to setting QWidget::windowModality to Qt::ApplicationModal.

exec() ignores the value of this property and always pops up the dialog as modal.

Access functions:

bool isModal() const
void setModal(bool modal)

See also QWidget::windowModality, show(), and exec().

pub unsafe fn set_orientation(&self, orientation: Orientation)[src]

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Calls C++ function: void QDialog::setOrientation(Qt::Orientation orientation).

C++ documentation:

If orientation is Qt::Horizontal, the extension will be displayed to the right of the dialog's main area. If orientation is Qt::Vertical, the extension will be displayed below the dialog's main area.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also orientation() and setExtension().

pub unsafe fn set_result(&self, r: c_int)[src]

Sets the modal dialog's result code to i.

Calls C++ function: void QDialog::setResult(int r).

C++ documentation:

Sets the modal dialog's result code to i.

Note: We recommend that you use one of the values defined by QDialog::DialogCode.

See also result().

pub unsafe fn set_size_grip_enabled(&self, arg1: bool)[src]

This property holds whether the size grip is enabled

Calls C++ function: void QDialog::setSizeGripEnabled(bool arg1).

C++ documentation:

This property holds whether the size grip is enabled

A QSizeGrip is placed in the bottom-right corner of the dialog when this property is enabled. By default, the size grip is disabled.

Access functions:

bool isSizeGripEnabled() const
void setSizeGripEnabled(bool)

pub unsafe fn set_visible(&self, visible: bool)[src]

Reimplemented from QWidget::setVisible().

Calls C++ function: virtual void QDialog::setVisible(bool visible).

C++ documentation:

Reimplemented from QWidget::setVisible().

pub unsafe fn show_extension(&self, arg1: bool)[src]

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Calls C++ function: [slot] void QDialog::showExtension(bool arg1).

C++ documentation:

If showIt is true, the dialog's extension is shown; otherwise the extension is hidden.

Instead of using this functionality, we recommend that you simply call show() or hide() on the part of the dialog that you want to use as an extension. See the Extension Example for details.

See also show(), setExtension(), and setOrientation().

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QDialog::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

Trait Implementations

impl CppDeletable for QMessageBox[src]

unsafe fn delete(&self)[src]

Destroys the message box.

Calls C++ function: virtual [destructor] void QMessageBox::~QMessageBox().

C++ documentation:

Destroys the message box.

impl Deref for QMessageBox[src]

type Target = QDialog

The resulting type after dereferencing.

fn deref(&self) -> &QDialog[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QMessageBox* ptr).

impl DynamicCast<QMessageBox> for QDialog[src]

unsafe fn dynamic_cast(ptr: Ptr<QDialog>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* dynamic_cast<QMessageBox*>(QDialog* ptr).

impl DynamicCast<QMessageBox> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* dynamic_cast<QMessageBox*>(QWidget* ptr).

impl DynamicCast<QMessageBox> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* dynamic_cast<QMessageBox*>(QObject* ptr).

impl DynamicCast<QMessageBox> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* dynamic_cast<QMessageBox*>(QPaintDevice* ptr).

impl StaticDowncast<QMessageBox> for QDialog[src]

unsafe fn static_downcast(ptr: Ptr<QDialog>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* static_cast<QMessageBox*>(QDialog* ptr).

impl StaticDowncast<QMessageBox> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* static_cast<QMessageBox*>(QWidget* ptr).

impl StaticDowncast<QMessageBox> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* static_cast<QMessageBox*>(QObject* ptr).

impl StaticDowncast<QMessageBox> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QMessageBox>[src]

Calls C++ function: QMessageBox* static_cast<QMessageBox*>(QPaintDevice* ptr).

impl StaticUpcast<QDialog> for QMessageBox[src]

unsafe fn static_upcast(ptr: Ptr<QMessageBox>) -> Ptr<QDialog>[src]

Calls C++ function: QDialog* static_cast<QDialog*>(QMessageBox* ptr).

impl StaticUpcast<QObject> for QMessageBox[src]

unsafe fn static_upcast(ptr: Ptr<QMessageBox>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QMessageBox* ptr).

impl StaticUpcast<QPaintDevice> for QMessageBox[src]

unsafe fn static_upcast(ptr: Ptr<QMessageBox>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QMessageBox* ptr).

impl StaticUpcast<QWidget> for QMessageBox[src]

unsafe fn static_upcast(ptr: Ptr<QMessageBox>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QMessageBox* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.