以下成员源于类 QMessageBox 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(obsolete)
typedef
|
Button |
(obsolete)
windowIconText
: QString
(obsolete)
|
QMessageBox (const QString & title , const QString & text , QMessageBox::Icon icon , int button0 , int button1 , int button2 , QWidget * parent = nullptr, Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint) |
(obsolete)
QString
|
buttonText (int button ) const |
(obsolete)
|
dumpObjectInfo () |
(obsolete)
|
dumpObjectTree () |
(obsolete)
QWidget *
|
extension () const |
(obsolete)
bool
|
isEnabledToTLW () const |
(obsolete)
bool
|
isTopLevel () const |
(obsolete)
Qt::Orientation
|
orientation () const |
(obsolete)
void
|
setButtonText (int button , const QString & text ) |
(obsolete)
void
|
setExtension (QWidget * extension ) |
(obsolete)
void
|
setOrientation (Qt::Orientation orientation ) |
(obsolete)
QWidget *
|
topLevelWidget () const |
(obsolete)
void
|
showExtension (bool showIt ) |
(obsolete)
int
|
critical (QWidget * parent , const QString & title , const QString & text , int button0 , int button1 , int button2 = 0) |
(obsolete)
int
|
critical (QWidget * parent , const QString & title , const QString & text , const QString & button0Text , const QString & button1Text = QString(), const QString & button2Text = QString(), int defaultButtonNumber = 0, int escapeButtonNumber = -1) |
(obsolete)
int
|
information (QWidget * parent , const QString & title , const QString & text , int button0 , int button1 = 0, int button2 = 0) |
(obsolete)
int
|
information (QWidget * parent , const QString & title , const QString & text , const QString & button0Text , const QString & button1Text = QString(), const QString & button2Text = QString(), int defaultButtonNumber = 0, int escapeButtonNumber = -1) |
(obsolete)
int
|
question (QWidget * parent , const QString & title , const QString & text , int button0 , int button1 = 0, int button2 = 0) |
(obsolete)
int
|
question (QWidget * parent , const QString & title , const QString & text , const QString & button0Text , const QString & button1Text = QString(), const QString & button2Text = QString(), int defaultButtonNumber = 0, int escapeButtonNumber = -1) |
(obsolete)
QPixmap
|
standardIcon (QMessageBox::Icon icon ) |
(obsolete)
int
|
warning (QWidget * parent , const QString & title , const QString & text , int button0 , int button1 , int button2 = 0) |
(obsolete)
int
|
warning (QWidget * parent , const QString & title , const QString & text , const QString & button0Text , const QString & button1Text = QString(), const QString & button2Text = QString(), int defaultButtonNumber = 0, int escapeButtonNumber = -1) |
This typedef is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
使用 QMessageBox::StandardButton 代替。
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Constructs a message box with a title , text , icon , and up to three buttons.
The icon must be one of the following:
Each button, button0 , button1 and button2 , can have one of the following values:
使用 QMessageBox::NoButton for the later parameters to have fewer than three buttons in your message box. If you don't specify any buttons at all, QMessageBox will provide an Ok button.
One of the buttons can be OR-ed with the QMessageBox::Default flag to make it the default button (clicked when Enter is pressed).
One of the buttons can be OR-ed with the QMessageBox::Escape flag to make it the cancel or close button (clicked when Esc is pressed).
QMessageBox mb("Application Name", "Hardware failure.\n\nDisk error detected\nDo you want to stop?", QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton); if (mb.exec() == QMessageBox::No) { // try again
消息框是 应用程序模态 对话框。
The parent and f 自变量被传递给 QDialog 构造函数。
另请参阅 setWindowTitle (), setText (),和 setIcon ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
Returns the text of the message box button button , or an empty string if the message box does not contain the button.
使用 button () 和 QPushButton::text () 代替。
另请参阅 setButtonText ().
[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 ,或 QMessageBox::No , etc.) of the button that was clicked.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), question (),和 warning ().
[static]
int
QMessageBox::
critical
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
, const
QString
&
button0Text
, const
QString
&
button1Text
= QString(), const
QString
&
button2Text
= QString(),
int
defaultButtonNumber
= 0,
int
escapeButtonNumber
= -1)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
这是重载函数。
Displays a critical error message box with the given title and text , as well as one, two, or three buttons. Returns the number of the button that was clicked (0, 1 or 2).
button0Text is the text of the first button, and is optional. If button0Text is not supplied, "OK" (translated) will be used. button1Text is the text of the second button, and is optional, and button2Text is the text of the third button, and is optional. defaultButtonNumber (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1, or 2 to make pressing Escape equivalent to clicking the relevant button.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), question (),和 warning ().
[static]
int
QMessageBox::
information
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
,
int
button0
,
int
button1
= 0,
int
button2
= 0)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
打开信息消息框采用给定 title 和 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 ,或 QMessageBox::No , etc.) of the button that was clicked.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 question (), warning (),和 critical ().
[static]
int
QMessageBox::
information
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
, const
QString
&
button0Text
, const
QString
&
button1Text
= QString(), const
QString
&
button2Text
= QString(),
int
defaultButtonNumber
= 0,
int
escapeButtonNumber
= -1)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
这是重载函数。
Displays an information message box with the given title and text , as well as one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2).
button0Text is the text of the first button, and is optional. If button0Text is not supplied, "OK" (translated) will be used. button1Text is the text of the second button, and is optional. button2Text is the text of the third button, and is optional. defaultButtonNumber (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the escape button; pressing Esc is the same as clicking this button. It defaults to -1; supply 0, 1 or 2 to make pressing Esc equivalent to clicking the relevant button.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 question (), warning (),和 critical ().
[static]
int
QMessageBox::
question
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
,
int
button0
,
int
button1
= 0,
int
button2
= 0)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
打开问题消息框采用给定 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 ,或 QMessageBox::No , etc.) of the button that was clicked.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), warning (),和 critical ().
[static]
int
QMessageBox::
question
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
, const
QString
&
button0Text
, const
QString
&
button1Text
= QString(), const
QString
&
button2Text
= QString(),
int
defaultButtonNumber
= 0,
int
escapeButtonNumber
= -1)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
这是重载函数。
Displays a question message box with the given title and text , as well as one, two or three buttons. Returns the index of the button that was clicked (0, 1 or 2).
button0Text is the text of the first button, and is optional. If button0Text is not supplied, "OK" (translated) will be used. button1Text is the text of the second button, and is optional. button2Text is the text of the third button, and is optional. defaultButtonNumber (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1 or 2 to make pressing Escape equivalent to clicking the relevant button.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), warning (),和 critical ().
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
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.
使用 addButton () 代替。
另请参阅 buttonText ().
[static]
QPixmap
QMessageBox::
standardIcon
(
QMessageBox::Icon
icon
)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
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 .
调用 QStyle::standardIcon () 采用 QStyle::SP_MessageBoxInformation etc. instead.
[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.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), question (),和 critical ().
[static]
int
QMessageBox::
warning
(
QWidget
*
parent
, const
QString
&
title
, const
QString
&
text
, const
QString
&
button0Text
, const
QString
&
button1Text
= QString(), const
QString
&
button2Text
= QString(),
int
defaultButtonNumber
= 0,
int
escapeButtonNumber
= -1)
此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
这是重载函数。
Displays a warning message box with the given title and text , as well as one, two, or three buttons. Returns the number of the button that was clicked (0, 1, or 2).
button0Text is the text of the first button, and is optional. If button0Text is not supplied, "OK" (translated) will be used. button1Text is the text of the second button, and is optional, and button2Text is the text of the third button, and is optional. defaultButtonNumber (0, 1 or 2) is the index of the default button; pressing Return or Enter is the same as clicking the default button. It defaults to 0 (the first button). escapeButtonNumber is the index of the Escape button; pressing Escape is the same as clicking this button. It defaults to -1; supply 0, 1, or 2 to make pressing Escape equivalent to clicking the relevant button.
消息框是 应用程序模态 对话框。
警告: 不要删除 parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the QMessageBox 构造函数。
另请参阅 information (), question (),和 critical ().