阅读背景:

Qt4学习笔记(七),QMessageBox对话框

来源:互联网 



#include <QtGui/QApplication>
#include <QMessageBox>

int main(int argc, char *argv[])
{
	QApplication a(argc, argv);

	//关于消息框
	QMessageBox::about(NULL, "this title", "this QMessageBox::about");
	
	//关于Qt消息框
	QMessageBox::aboutQt(NULL);
	
	//提示消息框
	QMessageBox::information(NULL, "this title", "this QMessageBox::information", 
		                     QMessageBox::Yes, QMessageBox::No);
	
	//询问消息框,有返回值
	QMessageBox::question(NULL, "this title", "this QMessageBox::question", 
		                  QMessageBox::Yes, QMessageBox::No);
	
	//警告消息框,有返回值
	QMessageBox::warning(NULL, "this title", "this QMessageBox::warning", 
		                 QMessageBox::Yes, QMessageBox::No);
	
	//致命错误消息框,有返回值
	QMessageBox::critical(NULL, "this title", "this QMessageBox::critical", 
		                  QMessageBox::Yes, QMessageBox::No);
	
	return a.exec();
}#include <QtGui/QApplication>
#inc



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: