I include my header files:
#include <QtWebkit>
#include <QtWebkit/QWebView>
#include <QUrl>
and add to the .pro
file QT+=webkit
but Qt
throw error:
undefined reference to
QWebView::load(QUrl const&)
I don't know why QWebView
doesn't work.
ui->webView->load(QUrl("http://google.com"));
and I use Fedora 21 64 bit
In Qt5
you need
QT += webkitwidgets
in .pro
file, not QT+=webkit
Header: #include <QWebView>
qmake: QT += webkitwidgets
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.