Help example

This example demonstrates how to use Qt Assistant as help system for your own application. You can control Qt Assistant either directly using e.g. the open button or indirectly by pressing F1.

This example provides a context sensitive help, i.e. pressing F1 will show the help for the item under the mouse cursor.

In order to run Qt Assistant properly you have to install the documentation profile for this example. Without the profile Qt Assistant will run with the default profile, which contains the documentation for Qt. It can still display arbitrary pages with the Display button or using the context help (F1), but Qt Assistant won't be customized for this example application.

Installing the documentation profile for this example is done by pressing the 'Install example documentation' button in the Help Example application. This will call the function HelpDemo::installExampleDocs() in the helpdemo.cpp file. This function shows how assistant can be run with the -addProfile option which will install the profile. If the user then checks the Run Qt Assistant customized for HelpExample button, assistant will be run with the option -profile HelpExample which will tell Qt Assistant to display only the documentation specified in that profile and to be customized according to the profile. At the enduser, the installation procedure will most likely perform the installing of the profile and the application will always call assistant with the -profile option.