QDoc Linking Guidelines: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Remove content already covered in QDoc manual: https://doc.qt.io/qt-6/qdoc-index.html)
(Added links to relevant pages of QDoc manual.)
 
Line 2: Line 2:
This page is part of the [[QtWritingGuidelines | Qt Writing Guidelines]]
This page is part of the [[QtWritingGuidelines | Qt Writing Guidelines]]


This page contains information about creating links to API pages and other articles and content.
QDoc allows linking to C++ API, QML API, other QDoc projects, and external sites. The QDoc Manual has a linking guide.


== Enabling Linking to Content Outside a Module ==
* [https://doc.qt.io/qt-6/qdoc-index.html QDoc Manual]
* [https://doc.qt.io/qt-6/08-qdoc-commands-creatinglinks.html Creating Links]


To link to a section, API, or page outside of the documentation project (content not included in the .qdocconf file), the module name must be set to the '''depends''' qdocconf variable.
== Linking to QDoc projects or Qt modules ==
 
To link to other QDoc projects, set the directory name to the '''depends''' variable of your project's .qdocconf file.
 
For example, to link to Qt Core, Qt QML, Qt GUI, and Qt Linguist pages such as API and examples, set the depends variable with the directory name:
<code>depends += qtcore qtqml qtgui qtlinguist </code>
<code>depends += qtcore qtqml qtgui qtlinguist </code>


The depends entry corresponds to the directories found in the '''QT_INSTALL_DOCS''' directory.
The depends entry corresponds to the directories found in the '''QT_INSTALL_DOCS''' directory.
For more information about linking to Qt documentation, visit the following pages from the QDoc Manual:
* [https://doc.qt.io/qt-6/22-qdoc-configuration-generalvariables.html#depends depends variable]
* [https://doc.qt.io/qt-6/qdoc-guide-conf.html Creating QDoc Configuration Files]
* [https://doc.qt.io/qt-6/25-qdoc-configuration-derivedprojects.html#description Supporting Derived Projects]

Latest revision as of 14:39, 14 October 2024

This page is part of the Qt Writing Guidelines

QDoc allows linking to C++ API, QML API, other QDoc projects, and external sites. The QDoc Manual has a linking guide.

Linking to QDoc projects or Qt modules

To link to other QDoc projects, set the directory name to the depends variable of your project's .qdocconf file.

For example, to link to Qt Core, Qt QML, Qt GUI, and Qt Linguist pages such as API and examples, set the depends variable with the directory name:

depends += qtcore qtqml qtgui qtlinguist

The depends entry corresponds to the directories found in the QT_INSTALL_DOCS directory.

For more information about linking to Qt documentation, visit the following pages from the QDoc Manual: