Qt WebChannel 5.6

Qt 5.6 | Qt WebChannel

Qt 5.6.3 Reference Documentation

# Qt WebChannel

Qt WebChannel enables peer-to-peer communication between the server (QML/C++ application) and the client (HTML/JavaScript or QML application). The transport mechanism is supported out of the box by Qt WebEngine. It works on all browsers that support Qt WebSockets, enabling Qt WebChannel applications to run in any JavaScript runtime. Additionally, a custom transport mechanism can also be implemented using Qt WebSockets to support Qt WebChannel-based communication.

The module provides a JavaScript library for seamless integration of C++ and QML applications with HTML/JavaScript and QML clients. The clients must use the JavaScript library to access the serialized QObjects published by the host applications.

## Getting Started

To use these classes in your application, use the following include statement:

      #include <QtWebChannel/QtWebChannel>

To link against the module, add this line to your qmake `.pro` file:

      QT += webchannel

The QML types are accessed by using:

      import QtWebChannel 1.0

## API Reference

- JavaScript API
- C++ API
- QML API

## Examples

- Examples