Back to home page

QT Cross Reference

 
 

    


0001 To Generate Qt Documentation:
0002 
0003 qtdoc contains the main Qt Reference Documentation, which includes
0004 overviews, Qt topics, and examples not specific to any Qt module.The
0005 configuration files are located in qtdoc/doc/config and the articles in
0006 qtdoc/doc/src. Note that QDoc is located in qtbase.
0007 
0008 The instructions in this file assumes that the prerequisite binaries are
0009 compiled and in the $PATH variable.
0010 
0011 Prerequisites:
0012     * qtbase exists
0013     * "qmake" and "qdoc" compiled and installed
0014     * other Qt repositories exist as needed
0015 
0016 The Qt Reference Documentation were written with links to the released modules
0017 for Qt 5. If the modules and repositories do not exist, then the resulting HTML
0018 files will contain broken links.
0019 
0020 There are two ways to build the documentation. One way is to compile the
0021 documentation using QDoc and the configuration file (qdocconf) file. The other
0022 way is to use qmake by running "make docs".
0023 
0024 Section 1 Building the qdocconf File
0025 
0026     This method is useful for building separate projects without any
0027     dependencies to other projects.
0028 
0029     To build using the qdocconf file, run the "qdoc" binary and pass the
0030     qdocconf file as a parameter. "qdoc" is found in qtbase repository. A
0031     mandatory "outputdir" must be specified.
0032 
0033         $> qdoc doc/config/qtdoc.qdocconf -outputdir html
0034 
0035     Note that QDoc will delete the contents of the "html" output directory.
0036 
0037 Section 2 Building using make
0038 
0039     QMake uses the QT_INSTALL_DOCS variable to determine where the documentation
0040     for Qt 5 are installed. This method is useful for linking to other Qt
0041     modules.
0042 
0043     To see where the documentation will be installed, run:
0044     $> qmake -query
0045 
0046     To generate the documentation, run:
0047 
0048     $> cd qtdoc  #or whichever repository's root
0049     $> qmake
0050     $> make docs
0051 
0052     "make docs" also works in the main Qt 5 repository. Running the command
0053     there will generate the documentation for Qt 5 and install them to the
0054     path set to the QT_INSTALL_DOCS variable.
0055 
0056 Section 3 Building Qt Documentation
0057 
0058     To build the Qt module documentation along with the Qt Reference Documentation,
0059     run the following:
0060 
0061     $> cd qt5  #the main qt5.git directory
0062     $> make qmake_all  #creates Makefiles for each repository
0063     $> make docs
0064 
0065     To generate only HTML files, run "make html_docs" instead of "make docs"
0066 
0067 Section 4 Packaging the Documentation
0068 
0069     To package the documentation for Qt Assistant, the HTML files must be
0070     compiled into a QCH file (.qch).
0071 
0072     Required binaries:
0073     * assistant - found in qttools
0074     * qhelpgenerator - found in qttools
0075 
0076     To compile thq qch file for each module, first enter the output directory
0077     which contains the .qhp file and generate the QCH file.
0078 
0079     $> cd qtbase/doc/qtdoc              #the default path for QT_INSTALL_DOCS for qtdoc
0080     $> qhelpgenerator qtdoc.qhp         #creates the QCH file called qtdoc.qch
0081 
0082     Alternatively, modules have a "qch_docs" target:
0083     $> cd qtbase
0084     $> make qch_docs #builds the QCH files for modules in qtbase
0085 
0086     The QCH file can then be loaded in Qt Assistant or Qt Creator. For Qt
0087     Assistant, the QCH file may be registered to automatically load it.
0088 
0089     $> assistant -register qtdoc.qch    #to automatically load the documentation
0090 
0091 Section 5 More Information
0092 
0093 For more information about Qt 5's documentation, refer to the Qt Project wiki:
0094 http://qt-project.org/wiki/Qt5DocumentationProject