QWebView on Qt4 and Qt5

user2090826 picture user2090826 · Oct 9, 2013 · Viewed 8.7k times · Source

I have a problem. I need to compile qt5 code on qt4. When I'm compiling it I have such error(on qt5 I haven't it):

QWebView: No Such File Or Directory

Here is my .pro file:

QT       += core gui xml webkitwidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = TPDetector
TEMPLATE = app


SOURCES += \
    main.cpp \
    mainwindow.cpp \
    VKAuth.cpp

HEADERS += \
    mainwindow.h \
    VKAuth.h

How I can build my project on qt4?

Answer

Francois Botha picture Francois Botha · Apr 4, 2015

I had to add the libqtwebkit-dev package for my app to compile.