标签:qt
1)错误1:QWebView 编译无法通过
QT4中:
[html] view plain copy print?
pro文件加入:QT += webkit
main.cpp中加入:
#include <QWebView>
QT5中:提示QWebView: No such file or directory
[html] view plain copy print?
*.pro 加上 QT += webkitwidgets
*.cpp 加上 #include <QtWebKitWidgets/QWebView>
2)错误2:QtGui/QApplication: No such file or directory的问题
[html] view plain copy print?
头文件包含找不到路径:#include<QtGui/QApplication>
将项目中main.cpp文件的头文件包含改为#include <QApplication>
在xx.pro中增加一行:
eaterThan(QT_MAJOR_VERSION, 4): QT += widgets
3)QT5中增加图标
[html] view plain copy print?
pro中添加一句:RC_ICONS = xxx.ico
QT5较QT4 pro中要多一句:
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
标签:qt
原文地址:http://11496263.blog.51cto.com/11486263/1846141