Use QT Create a Help document
1. Create a document that is a few HTML files, where you can use QT-provided tools like Qdoc and Doxygen to generate Help for HTML documents.
2. Organize document structure for QT Assistant
A) Create QT Help Project (. qhp)
I. Defining a namespace namespace must be unique, in addition to setting the virtual folder as a universal folder for the collection of documents. Each document collection here corresponds to a namespace, and these collections of documents are shared with each other through a virtual folder.
II. Define the filter section, which includes a table of contents, each of which can have corresponding properties associated with it, and possibly the user-defined Filter property will determine whether the document needs to be displayed according to the property.
III. Define keywords that define these keywords primarily for finding,
Iv. list all relevant files, the file here not only to include the HTML document, but also to include some other images and other files, (all the files)
3. The Help project file has been completed and you can view your help document in QT Assistant
A) Generate QT compression Help file
Qhelpgenerator Simpletextviewer.qhp-o Simpletextviewer.qch
b) Register it in the default Help collection of Qt assitant
Assistant-register Simpletextviewer.qch
Custom QT Assistant
1. To implement a custom QT assistant you must create your own collection file, which is stored in binary format and has Help Collection project file (. qhcp) files generated.
2. <?xml version= "1.0" encoding= "UTF-8"?>
<qhelpcollectionproject version= "1.0" >
<assistant>
<title>simple Text viewer</title>
<applicationIcon>images/handbook.png</applicationIcon>
<cacheDirectory>Trolltech/SimpleTextViewer</cacheDirectory>
Cachedirectory define subdirectories for user data directories
3. Set the startup page
<startPage>qthelp://com.trolltech.examples.simpletextviewer/doc/index.html</startPage>
This includes namespace and virtual directory, which is then the page that is eventually displayed
4. Help in setting up constructs help-related content
<aboutMenuText>
<text>about Simple Text viewer</text>
</aboutMenuText>
<aboutDialog>
<file>about.txt</file>
<icon>images/icon.png</icon>
</aboutDialog>
5. Generate and register the QCP file
<docFiles>
<generate>
<file>
<input>simpletextviewer.qhp</input>
<output>simpletextviewer.qch</output>
</file>
</generate>
<register>
<file>simpletextviewer.qch</file>
</register>
</docFiles>
6. Generate Help Collection project file
Qcollectiongenerator Simpletextviewer.qhcp-o SIMPLETEXTVIEWER.QHC
Assistant-collectionfile SIMPLETEXTVIEWER.QHC
Creating a document and customizing QT Assistant