In questa pagina

Contenuti speciali

I comandi relativi al contenuto del documento identificano parti della documentazione che presentano una rappresentazione speciale, un significato concettuale o una funzione particolare.

\quotation

I comandi ` \quotation ` e ` \endquotation ` delimitano una citazione estesa.

Il testo nel blocco delimitato è racchiuso tra i tag <blockquote> e </blockquote> nell'output HTML, ad esempio:

/*!
  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
*/

Il testo nel \quotation blocco apparirà nel codice HTML generato come:

<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>

Il foglio di stile integrato nella maggior parte dei browser visualizzerà il contenuto del tag <blockquote> con rientri a sinistra e a destra. L'esempio sopra riportato verrebbe visualizzato come:

Man mano che le nostre soluzioni venivano adottate in nuovi ambienti, abbiamo riscontrato un crescente bisogno di una più facile integrazione con una gamma più ampia di applicazioni aziendali.

Tuttavia, è possibile ridefinire il tag <blockquote> nel proprio file style.css.

\note

Il comando \note definisce un nuovo paragrafo preceduto da "Nota:" in grassetto. Il comando accetta come argomento un paragrafo continuo, terminando alla fine dello stesso. Il comando note è destinato esclusivamente a frasi brevi e non a paragrafi più lunghi su più righe.

Analogamente al \warning , la nota è pensata per affermazioni brevi e importanti. Per informazioni sull’uso, consultare le Linee guida di scrittura Qt.

\notranslate

Il comando ` \notranslate ` indica che il suo argomento non deve essere tradotto quando l'output generato viene inviato a un servizio di traduzione linguistica.

Altri comandi (\c, \tt) hanno lo stesso effetto, ma \notranslate non applica alcuna formattazione al proprio argomento.

Questo comando è stato introdotto nella versione 6.10 di QDoc.

\brief

Il comando \brief inserisce una descrizione di una sola frase relativa a uno qualsiasi dei comandi relativi agli argomenti.

Il testo breve viene utilizzato per introdurre la documentazione dell’oggetto associato e negli elenchi generati tramite il \generatelist comando e il \annotatedlist .

Il testo breve verrà visualizzato nella documentazione relativa a quell'argomento specifico.

Ad esempio, la proprietà booleana 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()
*/

e la proprietà ` 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(), ...
*/

Quando si utilizza il comando ` \brief ` per descrivere una classe, si consiglia di utilizzare una frase completa come questa:

The <classname> class is|provides|contains|specifies...

Attenzione: non ripetere la descrizione dettagliata utilizzando la stessa frase, poiché la breve sintesi costituirà il primo paragrafo della descrizione dettagliata.

/*!
   \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
*/

Utilizzo di \brief in un \namespace:

/*!
   \namespace Qt

   \brief The Qt namespace contains miscellaneous identifiers
   used throughout the Qt library.
*/

Utilizzo di \brief in 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>
*/

Vedi anche \property, \class, \namespace e \headerfile.

\legalese

I comandi \legalese e \endlegalese delimitano un contratto di licenza.

Nel codice HTML generato, il testo delimitato è racchiuso tra i tag <div class="LegaleseLeft"> e </div>.

Un esempio di contratto di licenza racchiuso tra \legalese e \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
*/

Nel codice HTML generato apparirà come:

<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>

Se il comando \endlegalese viene omesso, QDoc elaborerà il comando \legalese ma considererà il resto della pagina di documentazione come il contratto di licenza.

Idealmente, il testo della licenza dovrebbe trovarsi insieme al codice oggetto della licenza.

In caso contrario, la documentazione identificata come \legalese può essere raccolta utilizzando \generatelist con l'argomento legalese. Ciò è utile per generare una panoramica dei contratti di licenza associati al codice sorgente.

Nota: L'output del comando \generatelist legalese include solo i testi delle licenze \legalese presenti nel progetto di documentazione corrente. Se il progetto di documentazione corrente dipende da altri moduli, i testi delle loro licenze non verranno elencati.

\warning

Il comando ` \warning ` antepone la dicitura «Warning:» all’argomento del comando, in grassetto.

/*!
   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.