Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Problem Building With QWebView
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Problem Building With QWebView

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.3k 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.
  • C Offline
    C Offline
    carlinski
    wrote on last edited by
    #1

    I am trying to use QWebView for the first time.

    Ubuntu 12.04
    Qt 5.2.1

    In pro file I have added:

    @
    QT += core gui webkit webkitwidgets
    @

    mainwindow.cpp

    @
    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    #include <QtWebKitWidgets>
    #include <QWebView>

    MainWindow::MainWindow(QWidget parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    QWebView
    view = new QWebView;
    view->setUrl(QUrl("http://localhost"));
    view->show();

    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }
    @

    These are the compile errors, I have ran qmake, clean all etc,

    @
    error: cannot find -lxslt
    error: cannot find -lgio-2.0
    error: cannot find -lgstapp-0.10
    error: cannot find -lgstinterfaces-0.10
    error: cannot find -lgstpbutils-0.10
    error: cannot find -lgstvideo-0.10
    error: cannot find -lgstbase-0.10
    error: cannot find -lgstreamer-0.10
    error: cannot find -lgobject-2.0
    error: cannot find -lgmodule-2.0
    error: cannot find -lxml2
    error: cannot find -lgthread-2.0
    error: cannot find -lglib-2.0
    error: collect2: error: ld returned 1 exit status
    @

    Any idea?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Nothing specific to QWebView here, you are missing all the libraries listed there on your system in order to build your application with Qt.

      Start by installing the gstreamer related packages.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Offline
        C Offline
        carlinski
        wrote on last edited by
        #3

        [quote author="SGaist" date="1395144422"]Hi,

        Nothing specific to QWebView here, you are missing all the libraries listed there on your system in order to build your application with Qt.

        Start by installing the gstreamer related packages. [/quote]

        That's odd, all of my other projects compile fine. OK, will start with gstreamer.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Because you didn't used the multimedia stuff yet ;)

          These dependencies won't show until you need them (or a module you use needs them)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • C Offline
            C Offline
            carlinski
            wrote on last edited by
            #5

            Sorted.

            Used

            @
            sudo apt-get install libgstreamer-plugins-base0.10-dev
            @

            and its all working now.

            Thanks again.

            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