1.--->编译遇到类似错误:
error: QCalendarWidget: No such file or directory
error: QComboBox: No such file or directory
error: QDateEdit: No such file or directory
解决方案如下:
1.在*.pro文件里添加:
QT += widgets
2.修改
#include <QtGui/QCalendarWidget>
#include <QtGui/QComboBox>
#include <QtGui/QDateEdit>
为
#include <QCalendarWidget>
#include <QComboBox>
#include <QDateEdit>
2.--->编译遇到如下错误:
1
error: 'UnicodeUTF8' is not a member of 'QApplication'
原因是:QCoreApplication::UnicodeUTF8已被弃用
解决方案如下:
修改
1
setText(QApplication::translate("MainWindow", "&Quitar", 0, QApplication::UnicodeUTF8));
为
1
setText(QApplication::translate("MainWindow", "&Quitar", 0);
error: QCalendarWidget: No such file or directory
error: QComboBox: No such file or directory
error: QDateEdit: No such file or directory
解决方案如下:
1.在*.pro文件里添加:
QT += widgets
2.修改
#include <QtGui/QCalendarWidget>
#include <QtGui/QComboBox>
#include <QtGui/QDateEdit>
为
#include <QCalendarWidget>
#include <QComboBox>
#include <QDateEdit>
2.--->编译遇到如下错误:
1
error: 'UnicodeUTF8' is not a member of 'QApplication'
原因是:QCoreApplication::UnicodeUTF8已被弃用
解决方案如下:
修改
1
setText(QApplication::translate("MainWindow", "&Quitar", 0, QApplication::UnicodeUTF8));
为
1
setText(QApplication::translate("MainWindow", "&Quitar", 0);