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

[Prev: Full Text Searching] [Home]

## Adding Documentation to Qt Assistant

Adding new documentation to Qt Assistant is straight-forward. You simply specify a new documentation content file for Qt Assistant to use.

Click Edit|Settings to invoke the Settings dialog. Click the Documentation tab. Now click Add to invoke a file open dialog. Select the new documentation's content file. (This file must be an XML file in Qt Assistant's documentation content file format.)

Another way to add your own documentation is, to start Qt Assistant with the commandline option '-addContentFile' followed by the documentation content file. Example: assistant -addContentFile /mycompany/myapp/help.xml

Qt Assistant will parse this file, add it and quit, i.e. no mainwindow will be shown. This way can be used when adding documentation during an installation process.

If the new documentation belongs to a category which does not currently appear in the Categories list box, you can add the category using the Settings dialog. It is not normally necessary to do this manually since Qt Assistant detects new categories and adds them automatically.

The format of the documentation content file is described in the following section.

### Documentation Content File format

The file must contain the documentation's table of contents and all important keywords for the index. Furthermore, it should inherit a category specification.

An example of a content file with all available tags is shown below:

`demodoc.xml`

    <!DOCTYPE DCF>
    <DCF ref="demo.html" category="qt/development" title="Development Demo Handbook">
    <section ref="./chap1/chap1.html" title="Chapter1">
        <section ref="./chap1/section1.html" title="Section1">
            <keyword ref="./chap1/section1.html#foo">foo</keyword>
            <keyword ref="./chap1/section1.html#bla">bla</keyword>
            <section ref="./chap1/section1.html#subsection1" title="Subsection 1"/>
            <section ref="./chap1/section1.html#subsection2" title="Subsection 2"/>
            <section ref="./chap1/section1.html#subsection3" title="Subsection 3"/>
        </section>
        <section ref="./chap1/section2" title="Section2">
            <section ref="./chap1/section2.html#subsection1" title="Subsection 1"/>
            <section ref="./chap1/section2.html#subsection2" title="Subsection 2"/>
            <section ref="./chap1/section2.html#subsection3" title="Subsection 3"/>
        </section>
    </section>
    <section ref="./chap2/chap2.html" title="Chapter2">
        <keyword ref="./chap2/chap2.html#foo">foo</keyword>
        <section ref="./chap2/section1.html" title="Section1"/>
    </section>
    </DCF>

Sections may be nested as deeply as necessary. All references should be related.

Note that any `keyword` tags for a given section must appear before any sections nested within the given section.

The paths in the `refs` attribute are always written Unix-style (forward slashes) and are relative to the location of the documentation content file itself.