Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

[Prev: Full Text Searching] [Home] [Next: Adding Documentation to a Profile]

## Customizing Qt Assistant with Profiles

You can change several aspects of Qt Assistant's behavior to adapt it to your needs. This is achieved by creating and modifying profiles. A profile is a collection of document content files and related information.

### How to Create a Profile

If you want to add or modify a profile, open the settings dialog, go to the profile tab and click Modify or Add. A new dialog pops up. Insert the name of the profile in the first line edit. This name is used both in the settings dialog (where you choose which profile to use) and when you start Qt Assistant specifying a particular profile on the command line. The title field is used to specify Qt Assistant's caption. Enter the path and file name in the icon line edit. Alternatively, click the ... browse button and choose the icon from the file open dialog. The next line edit contains your application's path (see below). The start page specifies which page Qt Assistant should initially display when the profile is used. Usually, this is the HTML file which contains the documentation's table of contents. If you want Qt Assistant's about box to display your own about text you must do two things. Firstly, you must enter the menu text in the 'about menu text' line edit. This text will appear in Qt Assistant's help menu, and when the user clicks it, the about box will be displayed. Secondly, enter the name of the file that contains the about box's text in the 'about URL' line edit.

The documentation box contains a list of all the documentation content files used by this profile. (For further information about documentation content files see Documentation Content File format.)

If you have created the profile just for your own use, click OK and Qt Assistant will save the profile.

If Qt Assistant is used as the help system for an application, it must be initialized with a profile that identifies the location and content of the help files supplied with the application. The profile is created using this dialog. It must then be exported into a file (by clicking the Export button and choosing a file name). When exporting, Qt Assistant determines the relative path between the documentation content files and the application path. When Qt Assistant and the documentation are installed the relative paths are converted to absolute paths that take account of where the application is actually installed. (The next section explains how to initialize Qt Assistant using the exported profile file.)

### How to Use a Profile

If the profile is only for your own use, either create a new one or modify an existing one. When you click OK, the new or modified profile will take effect.

If you want to use a profile with an application that you are distributing, create the profile and export it to a file as described in the previous section. To make use of an exported profile, call Qt Assistant from your installation program with the following option:

    assistant -addProfile path/to/profile path/to/application

This command line will not launch Qt Assistant in GUI mode, but will simply register your profile and then terminate. The `path/to/profile` is the path to the profile file on the installation media. The `path/to/application` is the path to the installed application on the user's hard disk, i.e. the specified application path from the profile is replaced by `path/to/application`. When the user runs Qt Assistant it will use the profile that was installed with the `-addProfile` call.

The base path (`path/to/application`) is the path to the "root" of the application. For example, `C:\Program Files\MyApp`. The documentation might be stored in `C:\Program Files\MyApp\help` and the executable in `C:\Program Files\MyApp\bin`.

If you don't provide the path, Qt Assistant will use the path from the old profile file.

When Qt Assistant is run for the first time it tries to find a profile so that it can find documents to display. If it can't find a profile and none is specified on the command line, a default profile containing all Qt related documentation is created. If the first run finds a profile, then no Qt profile will be created. If Qt Assistant has more than one profile, the one you want to be used can be specified at startup like this:

    assistant -profile profilename

or later in the settings dialog.

For small documentation sets the sidebar might not be necessary. You can hide the side bar on startup with the option

    assistant -hideSidebar

[Prev: Full Text Searching] [Home] [Next: Adding Documentation to a Profile]