Qt5 with WebKit
-
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>@
-
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)
-
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 togst_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 tog_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 togst_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 -
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 ?