QT에서 MessageBox를 구현하려면 다음과 같은 방법을 사용하여야 한다.
#include <QMessageBox>
QMessageBox::warning(this, tr("Title"), tr("Message"), Buttons);
QMessageBox::question(this, tr("Title"), tr("Message"), Buttons);
QMessageBox::information(this, tr("Title"), tr("Message"), Buttons);
QMessageBox::critical(this, tr("Title"), tr("Message"), Buttons);
각각의 항목에 따른 아이콘들이 출력 되게 되어 있다.
또한, Button은 다음과 같이 구성되어 있다.
QMessageBox::Ok [OK 버튼]
QMessageBox::Cancel [Cancel 버튼] 값 : 2
QMessageBox::Yes [Yes 버튼] 값 : 3
QMessageBox::No [No 버튼] 값 : 4
QMessageBox::Abort [Abort 버튼] 값 : 5
QMessageBox::Retry [Retry 버튼] 값 : 6
QMessageBox::Ignore [Ignore 버튼] 값 : 7
QMessageBox::YesAll [Yes to All 버튼] 값 : 8
QMessageBox::NoAll [No to All 버튼] 값 : 9
'QT > Basics' 카테고리의 다른 글
Qt5 Windows 배포 정리 (0) | 2015.04.16 |
---|---|
QT tr() 다국어 지원 (0) | 2015.04.15 |
Include Path & Library Path 설정하기 (0) | 2015.04.13 |
Visual Studio 2013으로 Qt 사용하기 (0) | 2015.04.13 |
Qt5 VS2010으로 사용하기 [출처] Qt5 VS2010으로 사용하기 (0) | 2015.04.13 |