WebKit is an open-source browser engine with the corresponding engine gecko (the typesetting engine used by Mozilla Firefox) and Trident (also known as the typesetting engine used by Mshtml,ie). WebKit is also the name of the Apple Mac OS X System engine framework version, used primarily for safari,dashboard,mail and some other Mac OS X programs. WebKit contains the WebCore typesetting engine and Jscore engine from KDE khtml and KJS, when Apple compared Gecko and khtml, still chose the latter, because it has a clear source structure, very fast rendering speed.
Now QT built a WebKit engine for us to develop Hybird program, after countless small errors, I finally made out the first qtwebkit program = =;
The first line of the pro file is modified to:
QT + + core GUI WebKit webkitwidgets network
Main.cpp:
#include "mainwindow.h" #include <QApplication> #include <QtWebKitWidgets/QWebView>// Notice that Qwebview is inside the webkitwidgets, not webkit. int main (int argc, char *argv[])//parameter must be written otherwise error { qapplication a (argc, argv); Qwebview *view=new Qwebview; View->load (Qurl ("http://baidu.com"));//Pay attention to the case of Qurl!!! view->show (); return a.exec ();}
Operating effect:
The Ps:webkit core supports a variety of HTML5 's brilliant effects
Qtwebkit Beginner Example (with code)