Search code examples
c++qtsqliteqtwebkitqtgui

Cannot #include <QWebView> using QtCreator


I have read a lot trying to figure this out. I am using QtCreator on Ubuntu 13.10.

.pro:

#-------------------------------------------------
#
# Project created by QtCreator 2014-03-02T09:50:03
#
#-------------------------------------------------

QT       += core gui
QT       += webkit
QT       += webkit webkitwidgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = AndroidDecompiler
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

MAIN

#include "mainwindow.h"
#include <QApplication>
#include <QtWebKit>
#include <QWebView>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();



    QWebView view;
       view.show();
       view.setUrl(QUrl("http://google.com"));
    return a.exec();
}

Here is error ':-1: error: cannot find -lsqlite3'

I think it is due to not being able to include webview. Is their any suggestions?


Solution

  • You could install the sqlite3 library as follows:

    sudo apt-get install sqlite3 libsqlite3-dev