Creating a document and customizing QT Assistant

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.