简单代码:
#include <QCoreApplication>
#include <QGraphicsWebView>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
return a.exec();
}
示例.pro:
QT += core gui declarative network webkit multimedia
TARGET = QTTest
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
我得到的错误:
C1083: Cannot open include file: 'QGraphicsWebView': No such file or directory
答案 0 :(得分:2)
在第
行QT += core gui declarative network webkit multimedia
将webkit
替换为webkitwidgets
:
QT += core gui declarative network webkitwidgets multimedia