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

To add or modify a profile, click Edit|Settings to invoke the Settings dialog. Click the Profiles tab and then click Add to add a new profile, or Modify to edit an existing profile. Click Delete to delete a profile from the list.

The Profiles tab displays an 'Available Profiles' window that contains a list of all the profiles available.

To add or modify a profile, click Modify or Add to invoke the Edit Profile.

Enter the following information:

The Documentation window displays the documentation content files the profile contains. Click Add to add more documentation content files or click Delete to delete existing documentation content files. See Documentation Content File Format for more information.

After you have created the profile, click OK and Qt Assistant will save the profile.

To use Qt Assistant 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 (click the Export button and choosing a file from the Save Profile As dialog). 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

To create a profile for your own use, click Add or Modify, enter the information into the Edit Profile dialog and then click OK. The new or modified profile will be saved.

To create a profile for an application that you are distributing, create the profile and then export it to a file as described in the previous section.

To use a profile that has been exported, call Qt Assistant from your installation program with the following option:

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

This command 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 no profile 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, you can specify the one you want to be displayed 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 following:

assistant -hideSidebar

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


Copyright © 2003 TrolltechTrademarks
Qt version 3.2.0b2