QT5迁移无法打开包含文件:'QGraphicsWebView'?

时间:2013-02-24 23:04:05

标签: c++ migration qt5

简单代码:

#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

What the is going on there in QT5? this class shall Be included like this and so I shall see no such error? I do not get some fancy QT5 new feature?

1 个答案:

答案 0 :(得分:2)

在第

QT       += core gui declarative network webkit multimedia

webkit替换为webkitwidgets

QT       += core gui declarative network webkitwidgets multimedia