[Problem] - Import Webkit in a Qt Project



  • Hello :)

    I download the latest version of Webkit on their site, i built it but I can't import it into my project!
    If I add this code in my main.cpp, i get errors (if i don't put this, all works but i haven't web window lol ) :

    @QWebView *web = new QWebView();
    web->load(QUrl("http://www.google.com"));
    web->show();@

    I get the following errors:

    @:-1: avertissement : directory not found for option '-L/usr/local/pgsql/lib'
    :-1: avertissement : directory not found for option '-L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
    :-1: avertissement : directory not found for option '-F/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
    :-1: erreur : symbol(s) not found for architecture x86_64
    :-1: erreur : collect2: ld returned 1 exit status@

    Here is my code :)

    The .pro file​​:

    @TEMPLATE = app

    WEBKITHOME = /Users/Etienne/WebKit

    QT -= webkit
    debug: QMAKE_LIBDIR_FLAGS = -L$$WEBKITHOME/WebKitBuild/Debug/lib
    release: QMAKE_LIBDIR_FLAGS = -L$$WEBKITHOME/WebKitBuild/Release/lib

    LIBS = -QtWebKit

    INCLUDEPATH = $$WEBKITHOME/Source/WebKit/qt/Api $$INCLUDEPATH
    release: QMAKE_RPATHDIR = $$WEBKITHOME/WebKitBuild/Release/lib $$QMAKE_RPATHDIR
    debug: QMAKE_RPATHDIR = $$WEBKITHOME/WebKitBuild/Debug/lib $$QMAKE_RPATHDIR

    SOURCES +=
    main.cpp@

    And my main.cpp:

    @#include <QtGui/QApplication>
    #include "qwebview.h" // Here we put qwebview.h, not <QWebView> because we changed the directory of the webview in the .Pro

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QWebView *web = new QWebView();
    web->load(QUrl("http://www.google.com"));
    web->show();
    
    return app.exec&#40;&#41;;
    

    }@

    Could you help me?

    Thank you in advance :)
    Cordially



  • bq. directory not found

    Check this.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.