/usr/share/qt5/doc/qdoc/12-0-qdoc-commands-miscellaneous.html is in qttools5-doc-html 5.9.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdoc-manual-markupcmds.qdoc -->
<title>Miscellaneous | QDoc Manual 5.9</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td >Qt 5.9</td><td ><a href="qdoc-index.html">QDoc Manual</a></td><td >Miscellaneous</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.5 Reference Documentation</td>
</tr></table>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<link rel="prev" href="11-qdoc-commands-specialcontent.html" />
<link rel="next" href="21-0-qdoc-creating-dita-maps.html" />
<p class="naviNextPrevious headerNavi">
<a class="prevPage" href="11-qdoc-commands-specialcontent.html">Special Content</a>
<span class="naviSeparator"> ◦ </span>
<a class="nextPage" href="21-0-qdoc-creating-dita-maps.html">Creating DITA Maps</a>
</p><p/>
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#annotatedlist">\annotatedlist</a></li>
<li class="level1"><a href="#generatelist">\generatelist</a></li>
<li class="level2"><a href="#annotatedclasses"><code>annotatedclasses</code></a></li>
<li class="level2"><a href="#annotatedexamples"><code>annotatedexamples</code></a></li>
<li class="level2"><a href="#annotatedattributions"><code>annotatedattributions</code></a></li>
<li class="level2"><a href="#classes-op-lt-op-prefix-op-gt-op"><code>classes <prefix></code></a></li>
<li class="level2"><a href="#classesbymodule"><code>classesbymodule</code></a></li>
<li class="level2"><a href="#qmltypesbymodule"><code>qmltypesbymodule</code></a></li>
<li class="level2"><a href="#jstypesbymodule"><code>jstypesbymodule</code></a></li>
<li class="level2"><a href="#compatclasses"><code>compatclasses</code></a></li>
<li class="level2"><a href="#functionindex"><code>functionindex</code></a></li>
<li class="level2"><a href="#legalese"><code>legalese</code></a></li>
<li class="level2"><a href="#overviews"><code>overviews</code></a></li>
<li class="level2"><a href="#attributions"><code>attributions</code></a></li>
<li class="level2"><a href="#related"><code>related</code></a></li>
<li class="level1"><a href="#if">\if</a></li>
<li class="level1"><a href="#endif">\endif</a></li>
<li class="level1"><a href="#else">\else</a></li>
<li class="level1"><a href="#include">\include</a></li>
<li class="level2"><a href="#include-filename-snippet-identifier">\include filename snippet-identifier</a></li>
<li class="level1"><a href="#meta">\meta</a></li>
<li class="level1"><a href="#noautolist">\noautolist</a></li>
<li class="level1"><a href="#omit">\omit</a></li>
<li class="level1"><a href="#raw-avoid">\raw (avoid)</a></li>
<li class="level1"><a href="#unicode">\unicode</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Miscellaneous</h1>
<span class="subtitle"></span>
<!-- $$$12-0-qdoc-commands-miscellaneous.html-description -->
<div class="descr"> <a name="details"></a>
<p>These commands provide miscellaneous functions connected to the visual appearance of the documentation, and to the process of generating the documentation.</p>
<a name="annotatedlist-command"></a><a name="annotatedlist"></a>
<h2 id="annotatedlist">\annotatedlist</h2>
<p>The \annotatedlist command expands to a list of the members of a group, each member listed with its <i>brief</i> text. Below is an example from the Qt Reference Documentation:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
\section1 Drag and Drop Classes
These classes deal with drag and drop and the necessary mime type
encoding and decoding<span class="operator">.</span>
\annotatedlist draganddrop
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>This generates a list of all the C++ classes and/or QML types in the <i>draganddrop</i> group. A C++ class or QML type in the <i>draganddrop</i> group will have <i>\ingroup draganddrop</i> in its <i>\class</i> or <i>\qmltype</i> comment.</p>
<a name="generatelist-command"></a><a name="generatelist"></a>
<h2 id="generatelist">\generatelist</h2>
<p>The \generatelist command expands to a list of links to the documentation entities in a group. Below is an example from the Qt Reference Documentation:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page classes<span class="operator">.</span>html
\title All Classes
For a shorter list that only includes the most
frequently used classes<span class="operator">,</span> see \l{<span class="type"><a href="../qtcore/qt.html">Qt</a></span><span class="char">'s Main Classes}.
\generatelist classes Q
* /
</span>
</pre>
<p>This generates the <i>All Classes</i> page. The command accepts the following arguments:</p>
<a name="table-example"></a><a name="annotatedclasses"></a>
<h3 ><code>annotatedclasses</code></h3>
<p>The <code>annotatedclasses</code> argument provides a table containing the names of all the classes, and a description of each class. Each class name is a link to the class's reference documentation. For example:</p>
<div class="table"><table class="generic">
<tr valign="top" class="odd"><td ><a href="../qtwidgets/qdial.html">QDial</a></td><td >Rounded range control (like a speedometer or potentiometer)</td></tr>
<tr valign="top" class="even"><td ><a href="../qtwidgets/qdialog.html">QDialog</a></td><td >The base class of dialog windows</td></tr>
<tr valign="top" class="odd"><td ><a href="../qtcore/qdir.html">QDir</a></td><td >Access to directory structures and their contents</td></tr>
</table></div>
<p>A C++ class is documented with the <a href="13-qdoc-commands-topics.html#class-command">\class</a> command. The annotation for the class is taken from the argument of the class comment's <a href="11-qdoc-commands-specialcontent.html#brief-command">\brief</a> command.</p>
<a name="annotatedexamples"></a>
<h3 ><code>annotatedexamples</code></h3>
<p>The <code>annotatedexamples</code> argument provides a complete list of all examples as a set of tables containing the titles of all the examples, and a description of each example. Each title is a link to the example's documentation.</p>
<p>A separate table for each module (that has documented examples) is generated, provided that the module has defined a navigation.landingpage configuration variable. The <i>landingpage</i> variable is used as a title for a header that precedes each table.</p>
<a name="annotatedattributions"></a>
<h3 ><code>annotatedattributions</code></h3>
<p>The <code>annotatedattributions</code> argument provides a complete list of all attributions as a set of tables containing the titles of all the attributions, and a description of each attribution. Each title is a link to the attribution's page.</p>
<p>A separate table for each module (that has attributions) is generated, provided that the module has defined a navigation.landingpage configuration variable. The <i>landingpage</i> variable is used as a title for a header that precedes each table.</p>
<a name="list-example"></a><a name="classes-op-lt-op-prefix-op-gt-op"></a>
<h3 ><code>classes <prefix></code></h3>
<p>The <code>classes</code> argument provides a complete alphabetical list of the classes. The second argument, <code><prefix></code>, is the common prefix for the class names. The class names will be sorted on the character that follows the common prefix. e.g. The common prefix for the Qt classes is <code>Q</code>. The common prefix argument is optional. If no common prefix is provided, the class names will be sorted on their first character.</p>
<p>Each class name becomes a link to the class's reference documentation. This command is used to generate the <i>All Classes</i> page this way:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page classes<span class="operator">.</span>html
\title All Classes
\ingroup classlists
\brief Alphabetical list of classes<span class="operator">.</span>
This is a list of all <span class="type"><a href="../qtcore/qt.html">Qt</a></span> classes<span class="operator">.</span> For a list of the classes
provided <span class="keyword">for</span> compatibility with Qt3<span class="operator">,</span> see \l{Qt3 Support
Classes}<span class="operator">.</span> For classes that have been deprecated<span class="operator">,</span> see the
\l{Obsolete Classes} list<span class="operator">.</span>
\generatelist classes Q
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>A C++ class is documented with the <a href="13-qdoc-commands-topics.html#class-command">\class</a> command.</p>
<a name="classesbymodule"></a>
<h3 ><code>classesbymodule</code></h3>
<p>When this argument is used, a second argument is required, which specifies the module whose classes are to be listed. QDoc generates a table containing those classes. Each class is listed with the text of its <a href="11-qdoc-commands-specialcontent.html#brief-command">\brief</a> command.</p>
<p>For example, this command can be used on a module page as follows:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page phonon<span class="operator">-</span>module<span class="operator">.</span>html
\module Phonon
\title Phonon Module
\ingroup modules
\brief Contains namespaces and classes <span class="keyword">for</span> multimedia functionality<span class="operator">.</span>
\generatelist{classesbymodule Phonon}
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>Each class that is a member of the specified module must be marked with the <a href="19-qdoc-commands-grouping.html#inmodule-command">\inmodule</a> command in its \class comment.</p>
<a name="qmltypesbymodule"></a>
<h3 ><code>qmltypesbymodule</code></h3>
<p>Similar to <code>classesbymodule</code> argument, but used for listing the QML types from the QML module specified with the second argument.</p>
<p><b>Note: </b>Support for this argument was introduced in QDoc 5.6.</p><a name="jstypesbymodule"></a>
<h3 ><code>jstypesbymodule</code></h3>
<p>Similar to <code>classesbymodule</code> argument, but used for listing the JavaScript types from the module specified with the second argument.</p>
<p><b>Note: </b>Support for this argument was introduced in QDoc 5.6.</p><a name="compatclasses"></a>
<h3 ><code>compatclasses</code></h3>
<p>The <code>compatclasses</code> argument generates a list in alphabetical order of the support classes. It is normally used only to generate the Qt3 Support Classes page this way:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page compatclasses<span class="operator">.</span>html
\title Qt3 Support Classes
\ingroup classlists
\brief Enable porting of code from <span class="type"><a href="../qtcore/qt.html">Qt</a></span> <span class="number">3</span> to <span class="type"><a href="../qtcore/qt.html">Qt</a></span> <span class="number">4.</span>
These are the classes that <span class="type"><a href="../qtcore/qt.html">Qt</a></span> provides <span class="keyword">for</span> compatibility with <span class="type"><a href="../qtcore/qt.html">Qt</a></span>
<span class="number">3.</span> Most of these are provided by the <span class="type">Qt3Support</span> module<span class="operator">.</span>
\generatelist compatclasses
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>A support class is identified in the \class comment with the <a href="16-qdoc-commands-status.html#compat-command">\compat</a> command.</p>
<a name="functionindex"></a>
<h3 ><code>functionindex</code></h3>
<p>The <code>functionindex</code> argument provides a complete alphabetical list of all the documented member functions. It is normally used only to generate the <i>Qt function index</i> page this way:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page functions<span class="operator">.</span>html
\title All Functions
\ingroup funclists
\brief All documented <span class="type"><a href="../qtcore/qt.html">Qt</a></span> functions listed alphabetically with a
link to where each one is declared<span class="operator">.</span>
This is the list of all documented member functions and global
functions in the <span class="type"><a href="../qtcore/qt.html">Qt</a></span> API<span class="operator">.</span> Each function has a link to the
<span class="keyword">class</span> <span class="keyword">or</span> header file where it is declared and documented<span class="operator">.</span>
\generatelist functionindex
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<a name="legalese"></a>
<h3 ><code>legalese</code></h3>
<p>The <code>legalese</code> argument tells QDoc to generate a list of licenses in the current documentation project. Each license is identified using the <a href="11-qdoc-commands-specialcontent.html#legalese-command">\legalese</a> command.</p>
<a name="overviews"></a>
<h3 ><code>overviews</code></h3>
<p>The <code>overviews</code> argument is used to tell QDoc to generate a list by concatenating the contents of all the <a href="13-qdoc-commands-topics.html#group-command">\group</a> pages. Qt uses it to generate the <i>overviews</i> page this way:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page overviews<span class="operator">.</span>html
\title All Overviews and HOWTOs
\generatelist overviews
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<a name="attributions"></a>
<h3 ><code>attributions</code></h3>
<p>The <code>attributions</code> argument is used to tell QDoc to generate a list of attributions in the documentation.</p>
<a name="related"></a>
<h3 ><code>related</code></h3>
<p>The <code>related</code> argument is used in combination with the <a href="13-qdoc-commands-topics.html#group-command">\group</a> and <a href="19-qdoc-commands-grouping.html#ingroup-command">\ingroup</a> commands to list all the overviews related to a specified group. For example, the page for the <i>Programming with Qt</i> page is generated this way:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\group qt<span class="operator">-</span>basic<span class="operator">-</span>concepts
\title Programming with <span class="type"><a href="../qtcore/qt.html">Qt</a></span>
\brief The basic architecture of the <span class="type"><a href="../qtcore/qt.html">Qt</a></span> cross<span class="operator">-</span>platform application and UI framework<span class="operator">.</span>
<span class="type"><a href="../qtcore/qt.html">Qt</a></span> is a cross<span class="operator">-</span>platform application and UI framework <span class="keyword">for</span>
writing web<span class="operator">-</span>enabled applications <span class="keyword">for</span> desktop<span class="operator">,</span> mobile<span class="operator">,</span> and
embedded operating systems<span class="operator">.</span> This page contains links to
articles and overviews explaining key components and
techniuqes used in <span class="type"><a href="../qtcore/qt.html">Qt</a></span> development<span class="operator">.</span>
\generatelist {related}
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>Each page listed on this group page contains the command:</p>
<pre class="cpp">
\ingroup qt<span class="operator">-</span>basic<span class="operator">-</span>concepts
</pre>
<a name="if-command"></a><a name="if"></a>
<h2 id="if">\if</h2>
<p>The \if command and the corresponding \endif command enclose parts of a QDoc comment that only will be included if the condition specified by the command's argument is true.</p>
<p>The command reads the rest of the line and parses it as an C++ #if statement.</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\<span class="keyword">if</span> defined(opensourceedition)
\note This edition is <span class="keyword">for</span> the development of
\l{<span class="type"><a href="../qtcore/qt.html">Qt</a></span> Open Source Edition} {Free and Open Source}
software only; see \l{<span class="type"><a href="../qtcore/qt.html">Qt</a></span> Commercial Editions}<span class="operator">.</span>
\endif
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>This QDoc comment will only be rendered if the <code>opensourceedition</code> preprocessor symbol is defined, and specified in the <a href="22-qdoc-configuration-generalvariables.html#defines-variable">defines</a> variable in the configuration file to make QDoc process the code within #ifdef and #endif:</p>
<pre class="cpp">
defines <span class="operator">=</span> opensourceedition
</pre>
<p>You can also define the preprocessor symbol manually on the command line. For more information see the documentation of the <a href="22-qdoc-configuration-generalvariables.html#defines-variable">defines</a> variable.</p>
<p>See also <a href="12-0-qdoc-commands-miscellaneous.html#endif-command">\endif</a>, <a href="12-0-qdoc-commands-miscellaneous.html#else-command">\else</a>, <a href="22-qdoc-configuration-generalvariables.html#defines-variable">defines</a> and <a href="22-qdoc-configuration-generalvariables.html#falsehoods-variable">falsehoods</a>.</p>
<a name="endif-command"></a><a name="endif"></a>
<h2 id="endif">\endif</h2>
<p>The \endif command and the corresponding \if command enclose parts of a QDoc comment that will be included if the condition specified by the <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if</a> command's argument is true.</p>
<p>For more information, see the documentation of the <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if</a> command.</p>
<p>See also <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if</a>, <a href="12-0-qdoc-commands-miscellaneous.html#else-command">\else</a>, <a href="22-qdoc-configuration-generalvariables.html#defines-variable">defines</a> and <a href="22-qdoc-configuration-generalvariables.html#falsehoods-variable">falsehoods</a>.</p>
<a name="else-command"></a><a name="else"></a>
<h2 id="else">\else</h2>
<p>The \else command specifies an alternative if the condition in the <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if</a> command is false.</p>
<p>The \else command can only be used within <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if...\endif</a> commands, but is useful when there is only two alternatives.</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
The <span class="type"><a href="../qtcore/qt.html">Qt</a></span> <span class="number">3</span> support library is provided to keep old
source code working<span class="operator">.</span>
In addition to the \c <span class="type">Qt3Support</span> classes<span class="operator">,</span> <span class="type"><a href="../qtcore/qt.html">Qt</a></span> <span class="number">4</span> provides
compatibility functions when it<span class="char">'s possible for an old
API to cohabit with the new one.
\if !defined(QT3_SUPPORT)
\if defined(QT3_SUPPORTWARNINGS)
The compiler emits a warning when a
compatibility function is called. (This works
only with GCC 3.2+ and MSVC 7.)
\else
To use the Qt 3 support library, you need to
have the line QT += qt3support in your .pro
file (qmake automatically define the
QT3_SUPPORT symbol, turning on compatibility
function support).
You can also define the symbol manually (for example,
if you don'</span>t want to link against the \c
<span class="type">Qt3Support</span> library)<span class="operator">,</span> <span class="keyword">or</span> you can define \c
QT3_SUPPORT_WARNINGS instead<span class="operator">,</span> telling the
compiler to <span class="keyword">emit</span> a warning when a compatibility
function is called<span class="operator">.</span> (This works only with GCC
<span class="number">3.2</span><span class="operator">+</span> and MSVC <span class="number">7.</span>)
\endif
\endif
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>If the <code>QT3_SUPPORT</code> is defined, the comment will be rendered like this:</p>
<blockquote><p>The Qt 3 support library is provided to keep old source code working.</p>
<p>In addition to the Qt3Support classes, Qt 4 provides compatibility functions when it's possible for an old API to cohabit with the new one.</p>
</blockquote>
<p>If <code>QT3_SUPPORT</code> is not defined but <code>QT3_SUPPORT_WARNINGS</code> is defined, the comment will be rendered like this:</p>
<blockquote><p>The Qt 3 support library is provided to keep old source code working.</p>
<p>In addition to the Qt3Support classes, Qt 4 provides compatibility functions when it's possible for an old API to cohabit with the new one.</p>
<p>The compiler emits a warning when a compatibility function is called. (This works only with GCC 3.2+ and MSVC 7.)</p>
</blockquote>
<p>If none of the symbols are defined, the comment will be rendered as</p>
<blockquote><p>The Qt 3 support library is provided to keep old source code working.</p>
<p>In addition to the <code>Qt3Support</code> classes, Qt 4 provides compatibility functions when it's possible for an old API to cohabit with the new one.</p>
<p>To use the Qt 3 support library, you need to have the line QT += qt3support in your .pro file (qmake automatically define the QT3_SUPPORT symbol, turning on compatibility function support).</p>
<p>You can also define the symbol manually (e.g., if you don't want to link against the <code>Qt3Support</code> library), or you can define <code>QT3_SUPPORT_WARNINGS</code> instead, telling the compiler to emit a warning when a compatibility function is called. (This works only with GCC 3.2+ and MSVC 7.)</p>
</blockquote>
<p>See also <a href="12-0-qdoc-commands-miscellaneous.html#if-command">\if</a>, <a href="12-0-qdoc-commands-miscellaneous.html#endif-command">\endif</a>, <a href="22-qdoc-configuration-generalvariables.html#defines-variable">defines</a> and <a href="22-qdoc-configuration-generalvariables.html#falsehoods-variable">falsehoods</a>.</p>
<a name="include-command"></a><a name="include"></a>
<h2 id="include">\include</h2>
<p>The \include command sends all or part of the file specified by its first argument to the QDoc input stream to be processed as a QDoc comment snippet.</p>
<p>The command is useful when some snippet of commands or text is to be used in multiple places in the documentation. Use the \include command wherever you want to insert a snippet into the documentation. The file containing the snippet to include must be located under the path(s) listed in the <a href="22-qdoc-configuration-generalvariables.html#sourcedirs-variable">sourcedirs</a> QDoc configuration variable. It can be either any source file parsed by QDoc (or even the same one where \include command is used), or any other text file. To store snippets in a separate file that is not meant to be parsed by QDoc, use a file extension that is not listed in <a href="22-qdoc-configuration-generalvariables.html#sources-fileextensions-variable">sources.fileextensions</a>; for example, <code>.qdocinc</code>.</p>
<p>The command can have either one or two arguments. The first argument is always a file name. The contents of the file must be QDoc input, in other words, a sequence of QDoc commands and text, but without the enclosing QDoc comment <code>/</code><code>*!</code> ... <code>*</code><code>/</code> delimiters. If you want to include the entire named file, don't use the second argument. If you want to include only part of the file, see the <a href="12-0-qdoc-commands-miscellaneous.html#2-argument-form">two argument form</a> below. Here is an example of the one argument form:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\page corefeatures<span class="operator">.</span>html
\title Core Features
\<span class="keyword">include</span> examples<span class="operator">/</span>signalandslots<span class="operator">.</span>qdocinc
\<span class="keyword">include</span> examples<span class="operator">/</span>objectmodel<span class="operator">.</span>qdocinc
\<span class="keyword">include</span> examples<span class="operator">/</span>layoutmanagement<span class="operator">.</span>qdocinc
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>QDoc renders this page <a href="corefeatures.html">as shown here</a>.</p>
<a name="2-argument-form"></a><a name="include-filename-snippet-identifier"></a>
<h3 >\include filename snippet-identifier</h3>
<p>It is a waste of time to make a separate <code>.qdocinc</code> file for every QDoc include snippet you want to use in multiple places in the documentation, especially given that you probably have to put the copyright/license notice in every one of these files. So if you have a large number of snippets to be included, you can put them all in a single file if you want, and surround each one with:</p>
<pre class="cpp">
<span class="comment">//! [snippet-id1]</span>
<span class="type">QDoc</span> commands and text<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="comment">//! [snippet-id1]</span>
<span class="comment">//! [snippet-id2]</span>
More <span class="type">QDoc</span> commands and text<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="comment">//! [snippet-id2]</span>
</pre>
<p>Then you can use the two-argument form of the command:</p>
<pre class="cpp">
\input examples<span class="operator">/</span>signalandslots<span class="operator">.</span>qdocinc snippet<span class="operator">-</span>id2
\input examples<span class="operator">/</span>objectmodel<span class="operator">.</span>qdocinc another<span class="operator">-</span>snippet<span class="operator">-</span>id
</pre>
<p>It works as expected. The sequence of QDoc commands and text found between the two tags with the same name as the second argument is sent to the QDoc input stream. You can even have nested snippets.</p>
<p><b>Note: </b>Snippet identifiers work also within documentation comment (/*! .. */) blocks, so it's not necessary to use a separate <code>.qdocinc</code> file. When processing a comment block, QDoc removes any <code>//!</code> comment lines from the generated output.</p><a name="meta-command"></a><a name="meta"></a>
<h2 id="meta">\meta</h2>
<p>The \meta command is mainly used for including metadata in DITA XML files. It is also used when generating HTML output for specifying the <i>maintainer(s)</i> of a C++ class.</p>
<p>The command has two arguments: the first argument is the name of the metadata attribute, and the second argument is the value for the attribute. Each argument should be enclosed in curly brackets, as shown in this example:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\<span class="keyword">class</span> <span class="type"><a href="../qtwidgets/qwidget.html">QWidget</a></span>
\brief The <span class="type"><a href="../qtwidgets/qwidget.html">QWidget</a></span> <span class="keyword">class</span> is the base <span class="keyword">class</span> of all user interface objects<span class="operator">.</span>
\ingroup basicwidgets
\meta {technology} {User Interface}
\meta {platform} {macOS <span class="number">10.6</span>}
\meta {platform} {MeeGo}
\meta {audience} {user}
\meta {audience} {programmer}
\meta {audience} {designer}
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>When running QDoc to generate HTML, the example above will have no effect on the generated output, but if you run QDoc to generate DITA XML, the example will generate the following:</p>
<pre class="cpp">
<span class="operator"><</span><span class="operator">?</span>xml version<span class="operator">=</span><span class="string">"1.0"</span> encoding<span class="operator">=</span><span class="string">"UTF-8"</span><span class="operator">?</span><span class="operator">></span>
<span class="operator"><</span><span class="operator">!</span>DOCTYPE cxxClass PUBLIC <span class="string">"-//NOKIA//DTD DITA C++ API Class Reference Type v0.6.0//EN"</span> <span class="string">"dtd/cxxClass.dtd"</span><span class="operator">></span>
<span class="operator"><</span><span class="operator">!</span><span class="operator">-</span><span class="operator">-</span>qwidget<span class="operator">.</span>cpp<span class="operator">-</span><span class="operator">-</span><span class="operator">></span>
<span class="operator"><</span>cxxClass id<span class="operator">=</span><span class="string">"id-9a14268e-6b09-4eee-b940-21a00a0961df"</span><span class="operator">></span>
<span class="operator"><</span>apiName<span class="operator">></span><span class="type"><a href="../qtwidgets/qwidget.html">QWidget</a></span><span class="operator"><</span><span class="operator">/</span>apiName<span class="operator">></span>
<span class="operator"><</span>shortdesc<span class="operator">></span>the <span class="type"><a href="../qtwidgets/qwidget.html">QWidget</a></span> <span class="keyword">class</span> is the base <span class="keyword">class</span> of all user interface objects<span class="operator">.</span><span class="operator"><</span><span class="operator">/</span>shortdesc<span class="operator">></span>
<span class="operator"><</span>prolog<span class="operator">></span>
<span class="operator"><</span>author<span class="operator">></span><span class="type"><a href="../qtcore/qt.html">Qt</a></span> Development Frameworks<span class="operator"><</span><span class="operator">/</span>author<span class="operator">></span>
<span class="operator"><</span>publisher<span class="operator">></span><span class="type"><a href="../qtcore/qt.html">Qt</a></span> Project<span class="operator"><</span><span class="operator">/</span>publisher<span class="operator">></span>
<span class="operator"><</span>copyright<span class="operator">></span>
<span class="operator"><</span>copyryear year<span class="operator">=</span><span class="string">"2018"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>copyrholder<span class="operator">></span><span class="type"><a href="../qtcore/qt.html">Qt</a></span> Project<span class="operator"><</span><span class="operator">/</span>copyrholder<span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>copyright<span class="operator">></span>
<span class="operator"><</span>permissions view<span class="operator">=</span><span class="string">"all"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>metadata<span class="operator">></span>
<span class="operator"><</span>audience type<span class="operator">=</span><span class="string">"designer"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>audience type<span class="operator">=</span><span class="string">"programmer"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>audience type<span class="operator">=</span><span class="string">"user"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>category<span class="operator">></span>Class reference<span class="operator"><</span><span class="operator">/</span>category<span class="operator">></span>
<span class="operator"><</span>prodinfo<span class="operator">></span>
<span class="operator"><</span>prodname<span class="operator">></span><span class="type"><a href="../qtcore/qt.html">Qt</a></span> Reference Documentation<span class="operator"><</span><span class="operator">/</span>prodname<span class="operator">></span>
<span class="operator"><</span>vrmlist<span class="operator">></span>
<span class="operator"><</span>vrm version<span class="operator">=</span><span class="string">"4"</span> release<span class="operator">=</span><span class="string">"7"</span> modification<span class="operator">=</span><span class="string">"3"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>vrmlist<span class="operator">></span>
<span class="operator"><</span>component<span class="operator">></span><span class="type"><a href="../qtgui/qtgui-module.html">QtGui</a></span><span class="operator"><</span><span class="operator">/</span>component<span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>prodinfo<span class="operator">></span>
<span class="operator"><</span>othermeta name<span class="operator">=</span><span class="string">"platform"</span> content<span class="operator">=</span><span class="string">"MeeGo"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>othermeta name<span class="operator">=</span><span class="string">"platform"</span> content<span class="operator">=</span><span class="string">"macOS 10.6"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span>othermeta name<span class="operator">=</span><span class="string">"technology"</span> content<span class="operator">=</span><span class="string">"User Interface"</span><span class="operator">/</span><span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>metadata<span class="operator">></span>
<span class="operator"><</span><span class="operator">/</span>prolog<span class="operator">></span>
</pre>
<p>In the example output, several values have been set using default values obtained from the QDoc configuration file. See <a href="21-3-qt-dita-xml-output.html">Generating DITA XML Output</a> for details.</p>
<a name="noautolist-command"></a><a name="noautolist"></a>
<h2 id="noautolist">\noautolist</h2>
<p>The \noautolist command indicates that the annotated list of C++ classes or QML types, which is automatically generated at the bottom of the C++ or QML module page should be omitted, because the classes or types have been listed manually. This command can also be used with the <a href="13-qdoc-commands-topics.html#group-command">\group</a> command to omit the list of group members, when they are listed manually.</p>
<p>The command must stand on its own line. See Qt Sensors QML Types for an example. The page is generated from <code>qtsensors5.qdoc</code>. There you will find a qdoc comment containing the <code>\qmlmodule</code> command for the QtSensors module. The same qdoc comment contains two <code>\annotated-list</code> commands to list the QML types in two separate groups. The QML types have been divided into these two groups because it makes more sense to list them this way than it does to list them in a single alphabetical list. At the bottom of the comment, <code>\noautolist</code> has been used to tell qdoc not to generate the automatic annotated list.</p>
<p>This command was introduced in QDoc 5.6.</p>
<a name="omit-command"></a><a name="omit"></a>
<h2 id="omit">\omit</h2>
<p>The \omit command and the corresponding \endomit command delimit parts of the documentation that you want QDoc to skip. For example:</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
\table
\row
\li Basic Widgets
\li Basic GUI widgets such as buttons<span class="operator">,</span> comboboxes
and scrollbars<span class="operator">.</span>
\omit
\row
\li Component Model
\li Interfaces and helper classes <span class="keyword">for</span> the <span class="type"><a href="../qtcore/qt.html">Qt</a></span>
Component Model<span class="operator">.</span>
\endomit
\row
\li Database Classes
\li Database related classes<span class="operator">,</span> e<span class="operator">.</span>g<span class="operator">.</span> <span class="keyword">for</span> SQL databases<span class="operator">.</span>
\endtable
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>QDoc renders this as:</p>
<table align="center" cellpadding="2"
cellspacing="1" border="0">
<tr valign="top" bgcolor="#d0d0d0">
<td>Basic Widgets</td>
<td>Basic GUI widgets such as buttons, comboboxes
and scrollbars.</td>
</tr>
<tr valign="top" bgcolor="#c0c0c0">
<td>Database Classes</td>
<td>Database related classes, e.g. for SQL databases.</td>
</tr>
</table>
<a name="raw-command"></a><a name="raw-avoid"></a>
<h2 id="raw-avoid">\raw (avoid)</h2>
<p>The \raw command and the corresponding \endraw command delimit a block of raw mark-up language code.</p>
<p><b>Note: </b>Avoid using this command if possible, because it generates DITA XML code that causes problems. If you are trying to generate special table or list behavior, try to get the behavior you want using the <a href="04-qdoc-commands-textmarkup.html#span-command">\span</a> and <a href="04-qdoc-commands-textmarkup.html#div-command">\div</a> commands in your <a href="10-qdoc-commands-tablesandlists.html#table-command">\table</a> or <a href="10-qdoc-commands-tablesandlists.html#list-command">\list</a>.</p><p>The command takes an argument specifying the code's format. Currently, the only supported format is HTML.</p>
<p>The \raw command is useful if you want some special HTML effects in your documentation.</p>
<pre class="cpp">
<span class="operator">/</span> <span class="operator">*</span><span class="operator">!</span>
<span class="type"><a href="../qtcore/qt.html">Qt</a></span> has some predefined <span class="type"><a href="../qtgui/qcolor.html">QColor</a></span> objects<span class="operator">.</span>
\raw HTML
<span class="operator"><</span>style type<span class="operator">=</span><span class="string">"text/css"</span> id<span class="operator">=</span><span class="string">"colorstyles"</span><span class="operator">></span>
<span class="preprocessor">#color-blue { background-color: #0000ff; color: #ffffff }</span>
<span class="preprocessor">#color-darkBlue { background-color: #000080; color: #ffffff }</span>
<span class="preprocessor">#color-cyan { background-color: #00ffff; color: #000000 }</span>
<span class="operator"><</span><span class="operator">/</span>style<span class="operator">></span>
<span class="operator"><</span>p<span class="operator">></span>
<span class="operator"><</span>tt id<span class="operator">=</span><span class="string">"color-blue"</span><span class="operator">></span>Blue(<span class="preprocessor">#0000ff)</tt>,</span>
<span class="operator"><</span>tt id<span class="operator">=</span><span class="string">"color-darkBlue"</span><span class="operator">></span>dark blue(<span class="preprocessor">#000080)</tt> and</span>
<span class="operator"><</span>tt id<span class="operator">=</span><span class="string">"color-cyan"</span><span class="operator">></span>cyan(<span class="preprocessor">#00ffff)</tt>.</span>
<span class="operator"><</span><span class="operator">/</span>p<span class="operator">></span>
\endraw
<span class="operator">*</span> <span class="operator">/</span>
</pre>
<p>QDoc renders this as:</p>
<blockquote><p>Qt has some predefined <a href="../qtgui/qcolor.html">QColor</a> objects.</p>
<style type="text/css" id="colorstyles">
#color-blue { background-color: #0000ff; color: #ffffff }
#color-darkBlue { background-color: #000080; color: #ffffff }
#color-cyan { background-color: #00ffff; color: #000000 }
</style>
<p>
<tt id="color-blue">Blue(#0000ff)</tt>,
<tt id="color-darkBlue">dark blue(#000080)</tt> and
<tt id="color-cyan">cyan(#00ffff)</tt>.
</p>
</blockquote>
<p><b>Note: </b>But you can achieve the exact same thing using qdoc commands. In this case, all you have to do is include the color styles in your style.css file. Then you can write:</p><pre class="cpp">
\tt {\span {id<span class="operator">=</span><span class="string">"color-blue"</span>} {Blue(<span class="preprocessor">#0000ff)}},</span>
\tt {\span {id<span class="operator">=</span><span class="string">"color-darkBlue"</span>} {dark blue(<span class="preprocessor">#000080)}} and</span>
\tt {\span {id<span class="operator">=</span><span class="string">"color-cyan"</span>} {cyan(<span class="preprocessor">#00ffff)}}.</span>
</pre>
<p>...which is rendered as:</p>
<p><code><span id="color-blue">Blue(#0000ff)</span></code>, <code><span id="color-darkBlue">dark blue(#000080)</span></code> and <code><span id="color-cyan">cyan(#00ffff)</span></code>.</p>
<a name="unicode-command"></a><a name="unicode"></a>
<h2 id="unicode">\unicode</h2>
<p>The \unicode command allows you to insert an arbitrary Unicode character in the document.</p>
<p>The command takes an argument specifying the character as an integer. By default, base 10 is assumed, unless a '0x' or '0' prefix is specified (for base 16 and 8, respectively). For example:</p>
<pre class="cpp">
O G\unicode{<span class="number">0xEA</span>}nio e as Rosas
\unicode <span class="number">0xC0</span> table en famille avec <span class="number">15</span> \unicode <span class="number">0x20AC</span> par jour
\unicode <span class="number">0x3A3</span> \e{a}\sub{\e{i}}
</pre>
<p>QDoc renders this as:</p>
<blockquote><p>O Gênio e as Rosas</p>
<p>À table en famille avec 15 € par jour</p>
<p>Σ <i>a</i><sub><i>i</i></sub></p>
</blockquote>
</div>
<!-- @@@12-0-qdoc-commands-miscellaneous.html -->
<p class="naviNextPrevious footerNavi">
<a class="prevPage" href="11-qdoc-commands-specialcontent.html">Special Content</a>
<span class="naviSeparator"> ◦ </span>
<a class="nextPage" href="21-0-qdoc-creating-dita-maps.html">Creating DITA Maps</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> 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. </p>
</div>
</body>
</html>
|