Home

OFF-SOFT.net

OFF-SOFT.net

This site is support & information site of WEB,and Software. This site might help you that create software or Web Site…perhaps?[:]

Qt (8)-2 How to create QtHelp Files.

Published on| June 26th, 2009 | No Comment.
About HELP project Collection file(.Qhcp)
HELP project Collection file(. Qhcp) is, XML format, typically written in UTF8.

HELP in the same project, let's look at a simple example.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="utf-8" ?>
<QHelpCollectionProject version="1.0">
    <assistant>
        <title>Sample Help Applicatio Help</title>
        <startPage>qthelp://Sample_Help/doc/doc3.html</startPage>
        <currentFilter>Sample Help 1.0</currentFilter>
        <applicationIcon>star.png</applicationIcon>
        <enableFilterFunctionality>true</enableFilterFunctionality>
        <enableDocumentationManager>true</enableDocumentationManager>
        <enableAddressBar visible="true">true</enableAddressBar>
        <cacheDirectory>mycompany/myapplication</cacheDirectory>
        <aboutMenuText>
            <text>About Sample Help Application</text>
            <text language="ja">Sample Application ...</text>
        </aboutMenuText>
        <aboutDialog>
            <file>liecnce.txt</file>
            <file language="ja">liecnce_ja.txt</file>
            <icon>star.png</icon>
        </aboutDialog>
    </assistant>
    <docFiles>
        <generate>
            <file>
                <input>doc.qhp</input>
                doc.qch
            </file>
        </generate>
        <register>
            <file>doc.qch</file>
        </register>
    </docFiles>
</QHelpCollectionProject>

Here, HELP Project (doc.qhp) as we have already described.

The first line, XML declaration and the letter code specifying the format.
The second line, Qt is specified HELP Collection project version. At 2009.6, "1.0" is the latest. Looking at this, the Qt help recently, you'll see that it was introduced.

3 for each subsequent tag line, easily explained in the following table.

assistant of the tag is set, assistant operations are specified.
docFiles portion is set in the tag, which together specify the HELP project.

HELP Project collection file(.qhcp)
- Assistant tag
No TAG Name Commentary
(1) title Name Title
-- startPage Start page address
-- applicationIcon The top left corner image
(2) currentFilter The current filter name
(3) enableAddressBar To enable the address bar
(4) enableFilterFunctionality To enable the filter bar
(5) enableDocumentationManager Enabling Document Manager
-- cacheDirectory Houseroom temporary cache file
(6) aboutMenuText Help menu title
Using the text tag
(7) aboutDialog Customize About Dialog
file, icon use the tag

Each number on the part of the actual effects on the screen, please refer to it as described in the following screen.



HELP Project collection file(.qhcp)
- DocFiles Tags
TAG Name Commentary
generate Before you create a project file HELP collection (. Qhp) ->. Qch specify when you create the file.
tag file
    input tags: TOFAIRU input (. qhp file)
    Tag output: output file (. qch file)
register Subscribe to the collection Qt Compress Help file (. Qch) file specified in the file tags.

So far, When you are finally created by the command.

Qt to create help files
Qt help files (qch files, qhc files), create a command as described above.

Below,. Qhp files. Qch command is an example of when you create the file.
1
> qhelpgenerator doc.qhp -o doc.qch

Below,. Qhcp files. Qhc command is an example of when you create the file.
1
> qcollectiongenerator collection_doc.qhcp -o collection_doc.qhc


. qhcp generate files with. qhp files,. qch If the file is a command in the latter times,. qch files,. qhc you create the file.
(Ie, the former. Qch command file is created, it can be omitted. )

In this example, the following two files are created.
  • doc.qch
  • collection_doc.qhc

Now, Qt could help file.
Immediately, let's see.

From the command line, type the following.
1
> assistant -collectionFile collection_doc.qhc
※ is the current directory, collection_doc.qhc is the place.
※ As for this sample application, you do not operate if path is not put on 'Bin' at the installation destination of Qt.
Should not work, following the path of Qt installed the bin, again, please run.

Cases)
1
> set path=%path%;c:\qt\4.5\qt\bin

If you see the following screen is read correctly.




Yet, because I can not even been introduced, some that do not have everything in the environment. If Windows, HTML links to get help is that it is no less difficult, HTML, but also feel like a good help, Qt to create applications that are, basically, trying to multi-platform I think so, Qt think it is safe to create a help file to help along.

In addition, as described above, Qt help files, SQLite3 it is created, you can easily look inside.
Many may also develop an understanding of the table to peep through.

If you create an application, you also can distribute Qt distribution help,. Qch files,. Qhc, please note that you need to distribute a set of files.

Also, Qt is not the system is, QtAssistant required for the execution environment.
If the Windows environment, will not work unless at least the following files are also included.
  • ASSISTANT.EXE
  • QTHELP4.DLL
  • QTWEBKIT4.DLL
  • QTSQL4.DLL
  • QTGUI4.DLL
  • QTNETWORK4.DLL
  • QTCORE4.DLL

A little volume I have.
In the future, the application is too small, Qt environment, it may be unsuitable.
However, in recent years. Net than to download a set of environmental, may be cute.

In addition, the Qt help files, QtAssistant without the use of, and may even appear on the screen of their own.
The next article, I describe each in detail.


Comments

Leave a Reply







  • はてなブックマークへ追加する
  • Facebookでシェアする
  • twitter でつぶやく
  • Google Plusでシェアする
  • Pocketでシェアする
ページトップへ