标签:qt4升级qt5
--->编译遇到类似错误:
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>
--->编译遇到如下错误:
error: ‘UnicodeUTF8‘ is not a member of ‘QApplication‘
原因是:QCoreApplication::UnicodeUTF8已被弃用
解决方案如下:
修改
setText(QApplication::translate("MainWindow", "&Quitar", 0, QApplication::UnicodeUTF8));
为
setText(QApplication::translate("MainWindow", "&Quitar", 0);
本文出自 “rocky” 博客,请务必保留此出处http://rockytsaidream.blog.51cto.com/9571872/1576122
标签:qt4升级qt5
原文地址:http://rockytsaidream.blog.51cto.com/9571872/1576122