Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt5 with WebKit
Forum Updated to NodeBB v4.3 + New Features

Qt5 with WebKit

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 4.1k 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.
  • J Offline
    J Offline
    joeborg
    wrote on last edited by
    #1

    I'm not sure why, because Qt4.8.5 works fine, but when I use the Linux offline .run file to build Qt5 (5.1.0 or 5.1.1), no WebKit support is included, but no errors are thrown. The QWebView widget doesn't appear in Designer and if I try and use it in Creator, I get the following C++ error when I try to build:

    @undefined reference to `QWebView::QWebView(QWidget*)'@

    This regards the following line:

    @webView = new QWebView(centralWidget);@

    Needless to say, I am including QWebView:

    @#include <QtWebKitWidgets/QWebView>@

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

      Hi and welcome to devnet,

      Do you have

      @QT += webkitwidgets@

      in your pro file ?

      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
      • J Offline
        J Offline
        joeborg
        wrote on last edited by
        #3

        Thanks,
        That now works fine in creator. How do I build this if I write an app from scratch then? Also, how do I get it in designer?

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

          I am not sure to get your question this time. From scratch using qmake ? The same, you need to add this line. For designer (I can only guess here) I think it should show the widget once you've added the line (maybe re-run qmake)

          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
          • J Offline
            J Offline
            joeborg
            wrote on last edited by
            #5

            OK, thanks. I didn't realise that Qt5 was dependant on .pro files now. I'm also getting these errors with webkit:

            /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to deflateBound@ZLIB_1.2.0' /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to g_variant_ref'
            /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_x_overlay_set_window_handle' /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_query_parse_nth_buffering_range'
            /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to g_variant_unref' /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_element_link_pads_full'
            /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_is_initialized' /software/Qt/Qt5.1.1/5.1.1/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_query_get_n_buffering_ranges'
            collect2: ld returned 1 exit status

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

              Qt 5 as former Qt versions relies on pro files (you can also use cmake if you want)

              You seem to be missing the gstreamer and libz libraries, do you have the development package for them installed ?

              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

              • Login

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