Contenu spécial
Les commandes de contenu du document permettent d'identifier les parties de la documentation ayant un rendu, une signification conceptuelle ou une fonction particulière.
\quotation
Les commandes \quotation et \endquotation délimitent une longue citation.
Le texte du bloc délimité est entouré de <blockquote> et </blockquote> dans la sortie html, par exemple :
/*!
Although the prospect of a significantly broader market is
good news for Firstlogic, the notion also posed some
challenges. Dave Dobson, director of technology for the La
Crosse, Wisconsin-based company, said:
\quotation
As our solutions were being adopted into new
environments, we saw an escalating need for easier
integration with a wider range of enterprise
applications.
\endquotation
*/Le texte du bloc \quotation apparaîtra dans le code HTML généré sous la forme suivante :
<blockquote> <p>As our solutions were being adopted into new environments, we saw an escalating need for easier integration with a wider range of enterprise applications.</p> </blockquote>
La feuille de style intégrée à la plupart des navigateurs rendra le contenu de la balise <blockquote> avec des retraits à gauche et à droite. L'exemple ci-dessus sera rendu comme suit :
Au fur et à mesure que nos solutions étaient adoptées dans de nouveaux environnements, nous avons constaté qu'il était de plus en plus nécessaire de faciliter l'intégration avec un plus grand nombre d'applications d'entreprise.
Mais vous pouvez redéfinir la balise <blockquote> dans votre fichier style.css.
\note
La commande \note définit un nouveau paragraphe précédé de la mention "Note :" en gras. La commande prend un paragraphe continu comme argument et se termine après la fin du paragraphe. La commande note ne s'applique qu'aux énoncés courts et non aux paragraphes multilignes plus longs.
Comme la commande \warning la note est destinée aux déclarations courtes et importantes. Voir les directives d'écriture de Qt pour plus d'informations sur l'utilisation.
\notranslate
La commande \notranslate indique que son argument ne doit pas être traduit, lorsque la sortie générée est transmise à un service de traduction.
D'autres commandes (\c, \tt) ont le même effet, mais \notranslate ne stylise pas son argument.
Cette commande a été introduite dans la version 6.10 de QDoc.
\brief
La commande \brief introduit une description en une phrase de n'importe quelle commande de thème.
Ce texte est utilisé pour introduire la documentation de l'objet associé et dans les listes générées à l'aide de la commande \generatelist et la commande \annotatedlist et de la commande
Le texte court sera affiché dans la documentation de ce sujet particulier.
Par exemple, la propriété booléenne QWidget::isWindow:
/*! \property QWidget::isActiveWindow \brief Whether this widget's window is the active window. The active window is the window that contains the widget that has keyboard focus. When popup windows are visible, this property is \c true for both the active window \e and the popup. \sa activateWindow(), QApplication::activeWindow() */
et la propriété QWidget::geometry
/*! \property QWidget::geometry \brief The geometry of the widget relative to its parent and excluding the window frame. When changing the geometry, the widget, if visible, receives a move event (moveEvent()) and/or a resize event (resizeEvent()) immediately. ... \sa frameGeometry(), rect(), ... */
Lorsque la commande \brief est utilisée pour décrire une classe, il est recommandé d'utiliser une phrase complète comme celle-ci :
The <classname> class is|provides|contains|specifies...
Attention : Ne répétez pas votre description détaillée dans la même phrase car la brève déclaration sera le premier paragraphe de la description détaillée.
/*!
\class PreviewWindow
\brief The PreviewWindow class is a custom widget
displaying the names of its currently set
window flags in a read-only text editor.
The PreviewWindow class inherits QWidget. The widget
displays the names of its window flags set with the
setWindowFlags() function. It is also provided with a
QPushButton that closes the window.
...
\sa QWidget
*/Utilisation de \brief dans un \namespace:
/*! \namespace Qt \brief The Qt namespace contains miscellaneous identifiers used throughout the Qt library. */
Utilisation de \brief dans un \headerfile:
/*! \headerfile <QtGlobal> \title Global Qt Declarations \brief The <QtGlobal> header file provides basic declarations and is included by all other Qt headers. \sa <QtAlgorithms> */
Voir aussi \property, \class, \namespace et \headerfile.
\legalese
Les commandes \legalese et \endlegalese délimitent un accord de licence.
Dans le code HTML généré, le texte délimité est entouré de balises <div class="LegaleseLeft"> et </div>.
Exemple d'accord de licence encadré par les commandes \legalese et \endlegalese:
/*!
\legalese
Copyright 1996 Daniel Dardailler.
Permission to use, copy, modify, distribute, and sell this
software for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all
copies and that both that copyright notice and this
permission notice appear in supporting documentation, and
that the name of Daniel Dardailler not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission. Daniel
Dardailler makes no representations about the suitability of
this software for any purpose. It is provided "as is"
without express or implied warranty.
Modifications Copyright 1999 Matt Koss, under the same
license as above.
\endlegalese
*/Il apparaîtra dans le code HTML généré sous la forme suivante :
<div class="LegaleseLeft"> <p>Copyright 1996 Daniel Dardailler.</p> <p>Permission to use, copy, modify, distribute, and sell this software for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Daniel Dardailler not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Daniel Dardailler makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.</p> <p>Modifications Copyright 1999 Matt Koss, under the same license as above.</p> </div>
Si la commande \endlegalese est omise, QDoc traitera la commande \legalese mais considérera le reste de la page de documentation comme l'accord de licence.
Idéalement, le texte de la licence est situé avec le code sous licence.
Ailleurs, la documentation identifiée par la commande \legalese peut être accumulée en utilisant la commande \generatelist avec legalese comme argument. Cela permet d'obtenir une vue d'ensemble des accords de licence associés au code source.
Note : La sortie de la commande \generatelist legalese inclut les textes de \legalese dans le projet de documentation actuel uniquement. Si le projet de documentation actuel dépend d'autres modules, leurs textes de licence ne seront pas listés.
\warning
La commande \warning ajoute "Warning :" à l'argument de la commande, en caractères gras.
/*!
Qt::HANDLE is a platform-specific handle type
for system objects. This is equivalent to
\c{void *} on Windows and macOS, and to
\c{unsigned long} on X11.
\warning Using this type is not portable.
*/© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.