Obsolete Members for QMessageBox
QMessageBox 클래스의 다음 멤버들은 더 이상 사용되지 않습니다. 이 멤버들은 기존 소스 코드가 계속 작동하도록 하기 위해 제공됩니다. 새로운 코드에서는 이 멤버들을 사용하지 말 것을 강력히 권장합니다.
공개 유형
(deprecated) | Button |
공개 함수
(deprecated) | 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) |
(deprecated in 6.2) QString | buttonText(int button) const |
(deprecated in 6.2) void | setButtonText(int button, const QString &text) |
정적 공용 멤버
(deprecated in 6.2) int | critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0) |
(deprecated in 6.2) 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) |
(deprecated in 6.2) int | information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0) |
(deprecated in 6.2) 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) |
(deprecated in 6.2) int | question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0) |
(deprecated in 6.2) 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) |
(deprecated in 6.2) QPixmap | standardIcon(QMessageBox::Icon icon) |
(deprecated in 6.2) int | warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0) |
(deprecated in 6.2) 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) |
멤버 유형 설명
[deprecated] QMessageBox::Button
이 typedef는 더 이상 권장되지 않습니다. 새로운 코드에서는 이를 사용하지 않는 것이 좋습니다.
대신 ` QMessageBox::StandardButton `을 사용하십시오.
멤버 함수 문서
[deprecated] QMessageBox::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)
이 함수는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
title, text, icon 및 최대 세 개의 버튼이 포함된 메시지 상자를 생성합니다.
icon 는 다음 중 하나여야 합니다:
- QMessageBox::NoIcon
- QMessageBox::Question
- QMessageBox::Information
- QMessageBox::Warning
- QMessageBox::Critical
각 버튼( button0, button1, button2)은 다음 값 중 하나를 가질 수 있습니다:
- QMessageBox::NoButton
- QMessageBox::Ok
- QMessageBox::Cancel
- QMessageBox::Yes
- QMessageBox::No
- QMessageBox::Abort
- QMessageBox::Retry
- QMessageBox::Ignore
- QMessageBox::YesAll
- QMessageBox::NoAll
메시지 상자에 3개 미만의 버튼을 표시하려면 후속 매개변수에 ` QMessageBox::NoButton `을 사용하십시오. 버튼을 전혀 지정하지 않으면 QMessageBox가 '확인' 버튼을 제공합니다.
버튼 중 하나를 QMessageBox::Default 플래그와 OR 연산하여 기본 버튼(Enter 키를 누르면 클릭되는 버튼)으로 지정할 수 있습니다.
버튼 중 하나에 QMessageBox::Escape 플래그를 OR 연산으로 결합하여 해당 버튼을 취소 또는 닫기 버튼( Esc 키를 누르면 클릭되는 버튼)으로 지정할 수 있습니다.
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메시지 상자는 ' application modal ' 대화 상자입니다.
parent 및 f 인수는 QDialog 생성자에 전달됩니다.
setWindowTitle(), setText() 및 setIcon()도 참조하십시오 .
[deprecated in 6.2] QString QMessageBox::buttonText(int button) const
이 함수는 6.2 버전부터 사용이 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것이 좋습니다.
메시지 상자 버튼 button 의 텍스트를 반환하며, 메시지 상자에 해당 버튼이 없는 경우에는 빈 문자열을 반환합니다.
대신 ` button()` 및 ` QPushButton::text()`를 사용하십시오.
setButtonText()도 참조하십시오 .
[static, deprecated in 6.2] int QMessageBox::critical(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0)
이 함수는 6.2 버전부터 더 이상 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 매개변수로 받는 오버로드를 사용하십시오.
지정된 ` title ` 및 ` text`을 사용하여 중요 메시지 상자를 엽니다. 대화 상자에는 최대 세 개의 버튼이 있을 수 있습니다. 각 버튼 매개변수인 ` button0`, ` button1 ` 및 ` button2 `은 다음 값 중 하나로 설정할 수 있습니다:
- QMessageBox::NoButton
- QMessageBox::Ok
- QMessageBox::Cancel
- QMessageBox::Yes
- QMessageBox::No
- QMessageBox::Abort
- QMessageBox::Retry
- QMessageBox::Ignore
- QMessageBox::YesAll
- QMessageBox::NoAll
세 개의 버튼을 모두 사용하지 않으려면 마지막 버튼 또는 마지막 두 개의 버튼을 QMessageBox::NoButton 로 설정하십시오.
버튼 하나는 QMessageBox::Default 과 OR 연산을 할 수 있고, 다른 하나는 QMessageBox::Escape 과 OR 연산을 할 수 있습니다.
클릭된 버튼의 식별자(QMessageBox::Ok, QMessageBox::No 등)를 반환합니다.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자 실행 중에는 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
information(), question(), warning()도 참조하십시오 .
[static, deprecated in 6.2] 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)
이 함수는 6.2 버전부터 사용이 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 ` title ` 및 ` text`과 함께 하나, 둘 또는 세 개의 버튼이 포함된 중대한 오류 메시지 상자를 표시합니다. 클릭된 버튼의 번호(0, 1 또는 2)를 반환합니다.
button0Text 는 첫 번째 버튼의 텍스트이며, 선택 사항입니다. button0Text 가 지정되지 않으면 "OK"(번역된 텍스트)가 사용됩니다. button1Text 는 두 번째 버튼의 텍스트이며, 선택 사항이고, button2Text 는 세 번째 버튼의 텍스트이며, 선택 사항입니다. defaultButtonNumber (0, 1 또는 2)는 기본 버튼의 인덱스입니다. Return 또는 Enter 키를 누르는 것은 기본 버튼을 클릭하는 것과 동일합니다. 기본값은 0(첫 번째 버튼)입니다. escapeButtonNumber 는 Escape 버튼의 인덱스입니다. Escape 키를 누르는 것은 이 버튼을 클릭하는 것과 동일합니다. 기본값은 -1이며, Escape 키를 누르는 것이 해당 버튼을 클릭하는 것과 동일하게 하려면 0, 1 또는 2를 지정하십시오.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자 실행 중에 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
이 함수는 오버로드된 함수입니다.
information(), question(), warning()도 참조하십시오 .
[static, deprecated in 6.2] int QMessageBox::information(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0)
이 함수는 6.2 버전부터 더 이상 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것이 좋습니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 title 와 text 를 사용하여 정보 메시지 상자를 엽니다. 대화 상자에는 최대 세 개의 버튼이 있을 수 있습니다. 각 버튼( button0, button1, button2 )은 다음 값 중 하나로 설정할 수 있습니다.
- QMessageBox::NoButton
- QMessageBox::Ok
- QMessageBox::Cancel
- QMessageBox::Yes
- QMessageBox::No
- QMessageBox::Abort
- QMessageBox::Retry
- QMessageBox::Ignore
- QMessageBox::YesAll
- QMessageBox::NoAll
세 개의 버튼을 모두 사용하지 않으려면 마지막 버튼 또는 마지막 두 버튼을 QMessageBox::NoButton 로 설정하십시오.
버튼 하나에는 QMessageBox::Default 와 OR 연산을 적용할 수 있고, 다른 버튼 하나에는 QMessageBox::Escape 와 OR 연산을 적용할 수 있습니다.
클릭된 버튼의 식별자(QMessageBox::Ok, QMessageBox::No 등)를 반환합니다.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자가 실행되는 동안 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
question(), warning(), critical()도 참조하십시오 .
[static, deprecated in 6.2] 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)
이 함수는 6.2 버전부터 더 이상 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않을 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 title 과 text, 그리고 하나, 둘 또는 세 개의 버튼이 포함된 정보 메시지 상자를 표시합니다. 클릭된 버튼의 인덱스(0, 1 또는 2)를 반환합니다.
button0Text 는 첫 번째 버튼의 텍스트이며, 선택 사항입니다. button0Text 가 지정되지 않으면 "OK"(번역된 문자)가 사용됩니다. button1Text 는 두 번째 버튼의 텍스트이며, 선택 사항입니다. button2Text 는 세 번째 버튼의 텍스트이며, 선택 사항입니다. defaultButtonNumber (0, 1 또는 2)는 기본 버튼의 인덱스입니다. Return 또는 Enter 키를 누르는 것은 기본 버튼을 클릭하는 것과 동일합니다. 기본값은 0(첫 번째 버튼)입니다. escapeButtonNumber 는 이스케이프 버튼의 인덱스입니다. Esc 를 누르는 것은 이 버튼을 클릭하는 것과 동일합니다. 기본값은 -1이며, 0, 1 또는 2를 지정하면 Esc 키를 누르는 것이 해당 버튼을 클릭하는 것과 동일하게 작동합니다.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자가 실행되는 동안 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 만들어야 합니다.
이 함수는 오버로드된 함수입니다.
question(), warning() 및 critical()도 참조하십시오 .
[static, deprecated in 6.2] int QMessageBox::question(QWidget *parent, const QString &title, const QString &text, int button0, int button1 = 0, int button2 = 0)
이 함수는 6.2 버전부터 더 이상 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 title 및 text 를 사용하여 질문 메시지 상자를 엽니다. 대화 상자에는 최대 세 개의 버튼이 있을 수 있습니다. 각 버튼( button0, button1, button2 )은 다음 값 중 하나로 설정할 수 있습니다.
- QMessageBox::NoButton
- QMessageBox::Ok
- QMessageBox::Cancel
- QMessageBox::Yes
- QMessageBox::No
- QMessageBox::Abort
- QMessageBox::Retry
- QMessageBox::Ignore
- QMessageBox::YesAll
- QMessageBox::NoAll
세 개의 버튼을 모두 표시하지 않으려면 마지막 버튼 또는 마지막 두 버튼을 QMessageBox::NoButton 로 설정하십시오.
버튼 하나에는 QMessageBox::Default 와 OR 연산을, 다른 하나에는 QMessageBox::Escape 와 OR 연산을 적용할 수 있습니다.
클릭된 버튼의 식별자(QMessageBox::Yes, QMessageBox::No 등)를 반환합니다.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자가 실행되는 동안 parent 을 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
information(), warning(), critical()도 참조하십시오 .
[static, deprecated in 6.2] 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)
이 함수는 6.2 버전부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 ` title `과 ` text`을 사용하여 질문 메시지 상자를 표시하며, 버튼은 하나, 둘 또는 셋을 포함합니다. 클릭된 버튼의 인덱스(0, 1 또는 2)를 반환합니다.
button0Text 는 첫 번째 버튼의 텍스트이며, 선택 사항입니다. button0Text 가 지정되지 않으면 "OK"(번역된 텍스트)가 사용됩니다. button1Text 는 두 번째 버튼의 텍스트이며, 선택 사항입니다. button2Text 는 세 번째 버튼의 텍스트이며, 선택 사항입니다. defaultButtonNumber (0, 1 또는 2)는 기본 버튼의 인덱스입니다. Return 또는 Enter 키를 누르는 것은 기본 버튼을 클릭하는 것과 동일합니다. 기본값은 0(첫 번째 버튼)입니다. escapeButtonNumber 는 Escape 버튼의 인덱스입니다. Escape 키를 누르는 것은 이 버튼을 클릭하는 것과 동일합니다. 기본값은 -1이며, Escape 키를 누르는 것이 해당 버튼을 클릭하는 것과 동일하게 하려면 0, 1 또는 2를 지정하십시오.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자가 실행되는 동안 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
이 함수는 오버로드된 함수입니다.
information(), warning() 및 critical()도 참조하십시오 .
[deprecated in 6.2] void QMessageBox::setButtonText(int button, const QString &text)
이 함수는 6.2 버전부터 사용이 권장되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것이 좋습니다.
메시지 상자 내 버튼 button 의 텍스트를 text 로 설정합니다. 메시지 상자에 포함되지 않은 버튼의 텍스트를 설정하면 아무런 오류 메시지 없이 무시됩니다.
대신 addButton()을 사용하십시오.
buttonText()도 참조하십시오 .
[static, deprecated in 6.2] QPixmap QMessageBox::standardIcon(QMessageBox::Icon icon)
이 함수는 6.2 버전부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 말 것을 강력히 권장합니다.
표준 아이콘에 사용되는 픽스맵을 반환합니다. 이를 통해 더 복잡한 메시지 상자에서도 픽스맵을 사용할 수 있습니다. ` icon `는 필요한 아이콘을 지정합니다(예: ` QMessageBox::Question`, ` QMessageBox::Information`, ` QMessageBox::Warning ` 또는 ` QMessageBox::Critical`).
대신 QStyle::SP_MessageBoxInformation 등을 사용하여 QStyle::standardIcon()를 호출하십시오.
[static, deprecated in 6.2] int QMessageBox::warning(QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2 = 0)
이 함수는 6.2 버전부터 사용 중단 예정입니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 title 및 text 를 사용하여 경고 메시지 상자를 엽니다. 대화 상자에는 최대 세 개의 버튼이 있을 수 있습니다. 각 버튼 매개변수인 button0, button1 및 button2 는 다음 값 중 하나로 설정할 수 있습니다:
- QMessageBox::NoButton
- QMessageBox::Ok
- QMessageBox::Cancel
- QMessageBox::Yes
- QMessageBox::No
- QMessageBox::Abort
- QMessageBox::Retry
- QMessageBox::Ignore
- QMessageBox::YesAll
- QMessageBox::NoAll
세 개의 버튼을 모두 사용하지 않으려면 마지막 버튼 또는 마지막 두 버튼을 QMessageBox::NoButton 로 설정하십시오.
버튼 하나는 QMessageBox::Default 와 OR 연산을 수행할 수 있으며, 다른 하나는 QMessageBox::Escape 와 OR 연산을 수행할 수 있습니다.
클릭된 버튼의 정체(QMessageBox::Ok 또는 QMessageBox::No 또는 ...)를 반환합니다.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자가 실행되는 동안 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
information(), question(), critical()도 참조하십시오 .
[static, deprecated in 6.2] 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)
이 함수는 6.2 버전부터 더 이상 사용되지 않습니다. 새로운 코드에서는 이 함수를 사용하지 않는 것을 강력히 권장합니다.
대신 ` StandardButtons `을 인수로 받는 오버로드를 사용하십시오.
지정된 title 및 text 과 함께 하나, 둘 또는 세 개의 버튼이 포함된 경고 메시지 상자를 표시합니다. 클릭된 버튼의 번호(0, 1 또는 2)를 반환합니다.
button0Text 는 첫 번째 버튼의 텍스트이며, 선택 사항입니다. button0Text 가 지정되지 않으면 "OK"(번역된 문자)가 사용됩니다. button1Text 는 두 번째 버튼의 텍스트이며 선택 사항이고, button2Text 는 세 번째 버튼의 텍스트이며 선택 사항입니다. defaultButtonNumber (0, 1 또는 2)는 기본 버튼의 인덱스입니다. Return 또는 Enter 키를 누르는 것은 기본 버튼을 클릭하는 것과 동일합니다. 기본값은 0(첫 번째 버튼)입니다. escapeButtonNumber 는 Escape 버튼의 인덱스입니다. Escape 키를 누르는 것은 이 버튼을 클릭하는 것과 동일합니다. 기본값은 -1이며, Escape 키를 누르는 것이 해당 버튼을 클릭하는 것과 동일하게 만들려면 0, 1 또는 2를 지정하십시오.
메시지 상자는 application modal 대화 상자입니다.
경고: 대화 상자 실행 중에는 parent 를 삭제하지마십시오 . 이를 수행하려면 QMessageBox 생성자 중 하나를 사용하여 대화 상자를 직접 생성해야 합니다.
이 함수는 오버로드된 함수입니다.
information(), question(), critical()도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.