Friday, June 5, 2009

QtWebKit practice

Qt includes web-rendering engine: QtWebKit. By using QWebView class, we can build simple web-rendering widget.
#include <QApplication>
#include <QUrl>
#include <QWebView>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QUrl url("http://www.wolframalpha.com/");
QWebView* webView = new QWebView();
webView->load(url);
webView->show();
return a.exec();
}

When this program runs, widget with rendering area rises.


It's just only rendering area. i.e.
  • objects on the rendering area can work alone.
    (e.g. input to text box, submit a button, page transition, and so on.)
  • operations out of the rendering area can't work alone.
    (e.g. access over the proxy, bookmark, and so on.)

No comments:

Post a Comment