Integrating Web Content | Qt 5.4

- Qt 5.4
- Integrating Web Content
- Qt 5.4.2 Reference Documentation

# Integrating Web Content

To create Qt-based web applications, Qt provides both WebKit-based and Chromium-based (WebEngine) layout engines with support for a wide range of standard web techologies such as HTML, CSS, and JavaScript, that make it possible to embed content from the World Wide Web into your Qt application.

It is also possible to combine Qt C++ and QML code with HTML and JavaScript to create web applications. Through Qt WebChannel, several of Qt's APIs are accessible to remote clients.

## WebKit in Qt

Qt WebKit allows WebKit 2 functionality in QML applications by importing the WebView QML type. WebView has a minimalistic QML API for web content visualization. While it is not as feature-rich as the C++ API of the widget classes, it has multi-touch support and employs a multi-process architecture to render web content in a separate helper process (QtWebProcess). WebView makes it possible to interact with content using touch gestures such as panning with inertia (flick), pinch-zoom, tap and double- tap-to-zoom. The underlying split-process model (WebKit2) assures smooth animations in the embedding application (UI process) as well as increases stability.

These pages have more information about QML:

- Qt WebKit Examples
- QML Applications

### WebKit Widgets

The Qt WebKit Widgets module provides a feature-rich C++ API that facilitates loading, viewing, and editing web documents. Qt WebKit Widgets provides facilities for rendering of HyperText Markup Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript.

## WebEngine in Qt

As with Qt WebKit, Qt WebEngine allows web content to be displayed in Qt applications. This module is new in Qt 5.4 and in future releases will serve as a replacement to Qt WebKit.

These pages contain information about porting applications to use Qt WebEngine and the various APIs:

- Qt WebEngine - provides a QML API
- Qt WebEngine Widgets - provides a C++ API
- Porting from Qt WebKit to Qt WebEngine

## Qt and HTML-JavaScript Hybrid Applications

The Qt WebChannel module enables HTML or JavaScript clients to access Qt APIs such as QObject. It provides both C++ or QML API, allowing Qt apps to communicate with JavaScript and HTML frontends.

These pages contain more information about the various APIs:

- JavaScript API
- C++ API
- QML API
- Standalone Example