Explore some live examples of Wt below.

The source code of these (and many more) examples is included in the Wt source distribution. You may also browse through the source code of each example using the source code viewer, following the link below each example.

Cross-linked source code for these examples is also in doxygen documentation (in a new window).

Hello world!

Run example

This simple example illustrates most of the basic Wt concepts:

  • How to make a minimal Wt application, using WRun() to start the web server, and a function to create a new WApplication, corresponding to a new session.
  • Creating widgets, and adding them to the widget tree.
  • Reacting to events using the signal/slot mechanism.
  • Reading user input and updating widgets.

For a thorough (although slightly out-dated) explanation of the hello world example, see also the nice introduction to Wt written by Victor Venkman.

Browse the source code