Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. [Problem] - Import Webkit in a Qt Project
Forum Updated to NodeBB v4.3 + New Features

[Problem] - Import Webkit in a Qt Project

Scheduled Pinned Locked Moved Qt WebKit
2 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mistersunflower
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      bq. directory not found

      Check this.

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved