IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Qt WebChannel Standalone Example

A simple chat between a server and a remote client running in a browser.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Qt WebChannel Standalone Example▲

Image non disponible

Standalone demonstrates how to use the https:// C++ API to communicate with an external client. It is a simple chat between a C++ application and a remote HTML client running in your default browser.

Running the Example▲

To run the example from http://, open the Welcome mode and select the example from Examples. For more information, visit http://.

Communicating with a Remote Client▲

The C++ application sets up a https:// instance and publishes a Core object over it. For the remote client side, index.html is opened. Both show a dialog with the list of received messages and an input box to send messages to the other end.

The Core emits the Core::sendText() signal when the user sends a message. The signal automatically gets propagated to the HTML client. When the user enters a message on the HTML side, Core::receiveText() is called.

All communication between the HTML client and the C++ server is done over a https://. The C++ side instantiates a https:// and wraps incoming https:// connections in https:// objects. These objects are then connected to the https:// instance.

List of Files▲

Files:

List of Files▲

  • standalone/core.h

  • standalone/dialog.cpp

  • standalone/dialog.h

  • standalone/dialog.ui

  • standalone/index.html

  • standalone/main.cpp

  • standalone/standalone.pro

See Also▲

See also https://

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+   

Ce document est disponible sous la licence https:// telle que publiée par la Free Software Foundation.