Qt Documentation
Go to file
Safiyyah Moosa 58d456c89e Docs: Fix "Can't link to" example warnings
Task-number: QTBUG-113160
Pick-to: 6.5
Change-Id: I8aeb8c5619dd8b1bc2d9c6185f4871e7a100d4dc
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-04-28 21:23:12 +02:00
LICENSES Doc: Remove duplicate words (typos) 2023-03-06 12:12:36 +01:00
coin Doc: Enable zero warning limit 2021-11-15 21:32:46 +01:00
dist Add Qt 6.0.0 changes file 2020-11-13 11:43:57 +00:00
doc Docs: Fix "Can't link to" example warnings 2023-04-28 21:23:12 +02:00
examples Doc: Use the \examplecategory macro to tag examples 2023-04-12 12:51:59 +00:00
tests Fix the broken test after the retirement of qt_parse_all_arguments 2023-01-20 23:02:36 +01:00
.cmake.conf Remove QT_USE_SYNCQT_CPP 2023-01-02 17:41:21 +01:00
.gitattributes Update the git-archive export options 2012-09-03 19:51:51 +02:00
.gitignore Add CMakeLists.txt.user to .gitignore 2023-02-13 11:24:09 +08:00
.tag Update the git-archive export options 2012-09-03 19:51:51 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 10:01:38 +02:00
README Doc: Fix typos 2022-01-28 08:13:09 +01:00
conanfile.py Use SPDX license identifiers 2022-06-07 18:23:52 +02:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdoc 2023-04-25 19:01:57 +00:00
sync.profile remove dependencies from sync.profile 2016-11-14 12:18:33 +00:00

README

To Generate Qt Documentation:

qtdoc contains the main Qt Reference Documentation, which includes
overviews, Qt topics, and examples not specific to any Qt module.The
configuration files are located in qtdoc/doc/config and the articles in
qtdoc/doc/src. Note that QDoc is located in qttools/src/qdoc.

The instructions in this file assumes that the prerequisite binaries are
compiled and in the $PATH variable.

Prerequisites:
    * qtbase exists
    * "qmake" and "qdoc" compiled and installed
    * other Qt repositories exist as needed

The Qt Reference Documentation were written with links to the released modules
for Qt 5. If the modules and repositories do not exist, then the resulting HTML
files will contain broken links.

There are two ways to build the documentation. One way is to compile the
documentation using QDoc and the configuration file (qdocconf) file. The other
way is to use qmake by running "make docs".

Section 1 Building the qdocconf File

    This method is useful for building separate projects without any
    dependencies to other projects.

    To build using the qdocconf file, run the "qdoc" binary and pass the
    qdocconf file as a parameter. "qdoc" is found in qttools repository. A
    mandatory "outputdir" must be specified.

        $> qdoc doc/config/qtdoc.qdocconf -outputdir html

    Note that QDoc will delete the contents of the "html" output directory.

Section 2 Building using make

    QMake uses the QT_INSTALL_DOCS variable to determine where the documentation
    for Qt 5 are installed. This method is useful for linking to other Qt
    modules.

    To see where the documentation will be installed, run:
    $> qmake -query

    To generate the documentation, run:

    $> cd qtdoc  #or whichever repository's root
    $> qmake
    $> make docs

    "make docs" also works in the main Qt 5 repository. Running the command
    there will generate the documentation for Qt 5 and install them to the
    path set to the QT_INSTALL_DOCS variable.

Section 3 Building Qt Documentation

    To build the Qt module documentation along with the Qt Reference Documentation,
    run the following:

    $> cd qt5  #the main qt5.git directory
    $> make qmake_all  #creates Makefiles for each repository
    $> make docs

    To generate only HTML files, run "make html_docs" instead of "make docs"

Section 4 Packaging the Documentation

    Required binaries:
    * qhelpgenerator - found in qttools

    To compile the qch file for each module, first enter the output directory
    which contains the .qhp file and generate the QCH file.

    $> cd qtbase/doc/qtdoc              #the default path for QT_INSTALL_DOCS for qtdoc
    $> qhelpgenerator qtdoc.qhp         #creates the QCH file called qtdoc.qch

    Alternatively, modules have a "qch_docs" target:
    $> cd qtbase
    $> make qch_docs #builds the QCH files for modules in qtbase

    The QCH file can then be loaded in Qt Creator.

Section 5 More Information

For more information about Qt 5's documentation, refer to the Qt Project wiki:
http://wiki.qt.io/Qt5DocumentationProject