Qt 头文件互相包含会报错'' does not name a type"
报错内容: '<类名>' does not name a type
解决方法:改为不互相包含
消息框
类名:QMessageBox
头文件:#include 《QMessageBox》
静态函数
信息提示对话框:int information();
int ret = QMessageBox::information(this, "提示","你以获取此道具,无法重复获取");
1
问题对话框:int question();
int ret = QMessageBox::question(this, "问题", "是否确定?");
1
警告信息对话框:int warning();
int ret = QMessageBox::warning(this, "警告", "这样做可能导致无法预知的错误,是否继续?", QMessageBox::Ok | QMessageBox::No);
1
错误信息对话框:int critical();
QMessageBox::critical(this, "错误", "发生未知错误!");
1
关于对话框:void about();
QMessageBox::about(this, "关于", "关于我!");
1
关于Qt对话框:void aboutQt();
QMessageBox::aboutQt(this, "关于Qt");