Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QT5 Migration Cannot open include file: 'QGraphicsWebView'?

Tags:

c++

migration

qt5

Simple code:

#include <QCoreApplication>
#include <QGraphicsWebView>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    return a.exec();
}

Sample .pro:

QT       += core gui declarative network webkit multimedia

TARGET = QTTest
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp

And error I get:

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?

like image 500
myWallJSON Avatar asked Nov 03 '22 04:11

myWallJSON


1 Answers

In the line

QT       += core gui declarative network webkit multimedia

replace webkit by webkitwidgets :

QT       += core gui declarative network webkitwidgets multimedia
like image 154
Antwane Avatar answered Nov 09 '22 16:11

Antwane