Book Image

Application Development with Qt Creator - Second Edition

Book Image

Application Development with Qt Creator - Second Edition

Overview of this book

Table of Contents (20 chapters)
Application Development with Qt Creator Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Rendering web content with QWebView


Qt includes a port of WebKit, the popular browser implementation behind Safari and several open source browsers, in its Qt WebKit module. Using the Qt WebKit module, your application can display rich HTML, or even be a full-fledged web browser on its own. It's very easy to create hybrid applications that incorporate both features of native applications as well as displaying web content from local resources, the local filesystem, or the Internet. To use the Qt WebKit module, you must include it in your application by adding the following to your PRO file:

QT += webkitwidgets

Any source file that accesses the Qt WebKit widgets classes should also include the interfaces with the following #include statement:

#include <QtWebKitWidgets>

Note that this has changed if you're used to Qt 4.8; in Qt 4.8, the appropriate module to include was simply webkit and the file to include was QtWebKit.

The key class for web page presentation that this module exposes is QWebView...