Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Building Qt Documentation: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
'''English''' [[Building Qt Documentation Russian|Русский]] [[Building Qt Documentation Italian|Italiano]] [[Building Qt Documentation Spanish|Spanish]] [[Building Qt Documentation Japanese|日本語]] [[Building Qt Documentation SimplifiedChinese|简体中文]] [[Building Qt Documentation Korean|한국어]]
'''English''' [[Building_Qt_Documentation_Russian|Русский]] [[Building_Qt_Documentation_Italian|Italiano]] [[Building_Qt_Documentation_Spanish|Spanish]] [[Building_Qt_Documentation_Japanese|日本語]] [[Building_Qt_Documentation_SimplifiedChinese|简体中文]] [[Building_Qt_Documentation_Korean|한국어]]


=Building Qt Documentation=For information about writing documentation for Qt, see the [[Writing Qt Documentation]] page.For help on troubleshooting documentation builds, see the [[Troubleshooting Qt Documentation]] page.=Building Qt 5 Documentation=QDoc (''qdoc'' command in qtbase) builds the documentation and is included in standard Qt 5 installations. The official Qt documentation is built using Linux based machines, requiring libraries needed for [[Building Qt 5 from Git|building Qt 5]] and tested on the [http://doc.qt.io/qt-5.0/qtdoc/supported-platforms.html supported desktop platforms] ''[qt.io]''.===Required reading===
[toc align_right="yes" depth="3"]
** [[Get The Source|Get the Source Code]] download the Qt sources
 
** [[Building Qt 5 from Git|Building Qt 5]] build instructions for Qt 5For the standard installation of the Qt 5 repository (qt5.git), once Qt is built and installed, running ''make docs'' in the command line will build QDoc and the Qt 5 documentation set. The output will be located in ''qt5/qtbase/doc/'' or to the directory set to qmake’s QT_INSTALL_DOCS variable.<br />In many cases, building Qt 5 and submodules is not necessary. To build the documentation, it is necessary to build QDoc in qtbase and run ''qmake_all'' in each repository before running ''make docs''To do so after the configure step:<br /> On Windows, you may use the native ''nmake'' tool, instead. Note that qhelpgenerator has other dependencies in qtbase, therefore, it is best to compile qtbase before building qttools.Alternatively, “make html_docs” will only build the <span class="caps">HTML</span> files and will not create a qch package.For shadow builds, the source directory and install directories are different and the global templates need to be moved to the install directories. To do so, run:==Building the Module Documentation==The Qt modules have their documentation built by running ''make docs'' in the command line once Qt 5 is built and installed.<br />===Running qdoc Directly===QDoc builds are specified in ''qdocconf'' files which tells QDoc where to look and how to set up documentation. To run QDoc, pass the qdocconf file and the output directory as arguments.<br />==Modularized Documentation==The modules have a qdocconf file in the ''src'' directory. The [[Qt Documentation Structure|Qt_Documentation_Structure]] page has more information.=Building Qt4 Documentation=Build Qt as normal.Define environment variables for QT_SOURCE_TREE and for QT_BUILD_TREE appropriately. Make sure the <span class="caps">PATH</span> environment variable points to the ''bin'' directory containing the ''qdoc3'' executable.For the online docs it may be necessary to usefor later versions of Qt.For Windows™ use the nmake utility instead of make. Some Linux systems will require gmake instead of make.If you already have Qt compiled (from the <span class="caps">SDK</span>, for example) and want to build some special flavour of the doc, you can call directly qdoc3 (QT_SOURCE_TREE, QT_BUILD_TREE, and <span class="caps">QTDIR</span> must be set appropriately), here for <span class="caps">DITA</span> output:===Categories:===
= Building Qt Documentation =
** [[:Category:Developing Qt|Developing_Qt]]
 
*** [[:Category:Developing Qt::Documentation|Documentation]]
For information about writing documentation for Qt, see the [[Writing_Qt_Documentation|Writing Qt Documentation]] page.
 
For help on troubleshooting documentation builds, see the [[Troubleshooting_Qt_Documentation|Troubleshooting Qt Documentation]] page.
 
= Building Qt 5 Documentation =
 
QDoc (''qdoc'' command in qtbase) builds the documentation and is included in standard Qt 5 installations. The official Qt documentation is built using Linux based machines, requiring libraries needed for [[Building_Qt_5_from_Git | building Qt 5]] and tested on the &quot;supported desktop platforms&amp;quot;:http://doc.qt.io/qt-5.0/qtdoc/supported-platforms.html.
 
=== Required reading ===
 
* [[Get_The_Source | Get the Source Code]] - download the Qt sources
* [[Building_Qt_5_from_Git | Building Qt 5]] - build instructions for Qt 5
 
For the standard installation of the Qt 5 repository (qt5.git), once Qt is built and installed, running ''make docs'' in the command line will build QDoc and the Qt 5 documentation set. The output will be located in ''qt5/qtbase/doc/'' or to the directory set to qmake's QT_INSTALL_DOCS variable.<br /><code><br />cd qt5/<br />make docs<br /></code>
 
In many cases, building Qt 5 and submodules is not necessary. To build the documentation, it is necessary to build QDoc in qtbase and run ''qmake_all'' in each repository before running ''make docs''
 
To do so after the configure step:<br /><code><br />cd qt5/qtbase/src<br />make sub-qdoc #to build the qdoc binary<br />cd qt5/qttools<br />make #to build the qhelpgenerator<br />cd qt5/<br />make docs<br /></code><br />On Windows, you may use the native ''nmake'' tool, instead. Note that qhelpgenerator has other dependencies in qtbase, therefore, it is best to compile qtbase before building qttools.
 
Alternatively, &quot;make html_docs&amp;quot; will only build the HTML files and will not create a qch package.
 
For shadow builds, the source directory and install directories are different and the global templates need to be moved to the install directories. To do so, run:
 
<code><br />cd qtbase<br />make install_global_docs<br /></code>
 
== Building the Module Documentation ==
 
The Qt modules have their documentation built by running ''make docs'' in the command line once Qt 5 is built and installed.<br /><code><br />cd qt3d<br />make docs<br /></code>
 
=== Running qdoc Directly ===
 
QDoc builds are specified in ''qdocconf'' files which tells QDoc where to look and how to set up documentation. To run QDoc, pass the qdocconf file and the output directory as arguments.<br /><code><br />qdoc qt3d.qdocconf -outputdir html<br /></code>
 
== Modularized Documentation ==
 
The modules have a qdocconf file in the ''src'' directory. The [[Qt_Documentation_Structure]] page has more information.
 
= Building Qt4 Documentation =
 
Build Qt as normal.
 
Define environment variables for QT_SOURCE_TREE and for QT_BUILD_TREE appropriately. Make sure the PATH environment variable points to the ''bin'' directory containing the ''qdoc3'' executable.
 
<code><br />cd path/to/qt<br />make docs<br /></code>
 
For the online docs it may be necessary to use
 
<code><br />cd path/to/qt<br />make online_docs<br /></code>
 
for later versions of Qt.
 
For Windows™ use the nmake utility instead of make. Some Linux systems will require gmake instead of make.
 
If you already have Qt compiled (from the SDK, for example) and want to build some special flavour of the doc, you can call directly qdoc3 (QT_SOURCE_TREE, QT_BUILD_TREE, and QTDIR must be set appropriately), here for DITA output:
 
<code><br />cd qt-src<br />bin/qdoc3 tools/qdoc3/test/qt-ditaxml.qdocconf<br /></code>

Revision as of 14:28, 23 February 2015

English Русский Italiano Spanish 日本語 简体中文 한국어

[toc align_right="yes&quot; depth="3&quot;]

Building Qt Documentation

For information about writing documentation for Qt, see the Writing Qt Documentation page.

For help on troubleshooting documentation builds, see the Troubleshooting Qt Documentation page.

Building Qt 5 Documentation

QDoc (qdoc command in qtbase) builds the documentation and is included in standard Qt 5 installations. The official Qt documentation is built using Linux based machines, requiring libraries needed for building Qt 5 and tested on the "supported desktop platforms&quot;:http://doc.qt.io/qt-5.0/qtdoc/supported-platforms.html.

Required reading

For the standard installation of the Qt 5 repository (qt5.git), once Qt is built and installed, running make docs in the command line will build QDoc and the Qt 5 documentation set. The output will be located in qt5/qtbase/doc/ or to the directory set to qmake's QT_INSTALL_DOCS variable.

<br />cd qt5/<br />make docs<br />

In many cases, building Qt 5 and submodules is not necessary. To build the documentation, it is necessary to build QDoc in qtbase and run qmake_all in each repository before running make docs

To do so after the configure step:

<br />cd qt5/qtbase/src<br />make sub-qdoc #to build the qdoc binary<br />cd qt5/qttools<br />make #to build the qhelpgenerator<br />cd qt5/<br />make docs<br />


On Windows, you may use the native nmake tool, instead. Note that qhelpgenerator has other dependencies in qtbase, therefore, it is best to compile qtbase before building qttools.

Alternatively, "make html_docs&quot; will only build the HTML files and will not create a qch package.

For shadow builds, the source directory and install directories are different and the global templates need to be moved to the install directories. To do so, run:

<br />cd qtbase<br />make install_global_docs<br />

Building the Module Documentation

The Qt modules have their documentation built by running make docs in the command line once Qt 5 is built and installed.

<br />cd qt3d<br />make docs<br />

Running qdoc Directly

QDoc builds are specified in qdocconf files which tells QDoc where to look and how to set up documentation. To run QDoc, pass the qdocconf file and the output directory as arguments.

<br />qdoc qt3d.qdocconf -outputdir html<br />

Modularized Documentation

The modules have a qdocconf file in the src directory. The Qt_Documentation_Structure page has more information.

Building Qt4 Documentation

Build Qt as normal.

Define environment variables for QT_SOURCE_TREE and for QT_BUILD_TREE appropriately. Make sure the PATH environment variable points to the bin directory containing the qdoc3 executable.

<br />cd path/to/qt<br />make docs<br />

For the online docs it may be necessary to use

<br />cd path/to/qt<br />make online_docs<br />

for later versions of Qt.

For Windows™ use the nmake utility instead of make. Some Linux systems will require gmake instead of make.

If you already have Qt compiled (from the SDK, for example) and want to build some special flavour of the doc, you can call directly qdoc3 (QT_SOURCE_TREE, QT_BUILD_TREE, and QTDIR must be set appropriately), here for DITA output:

<br />cd qt-src<br />bin/qdoc3 tools/qdoc3/test/qt-ditaxml.qdocconf<br />