Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdoc-guide.qdoc
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3/*!
4 \page qdoc-guide.html
5 \title Getting Started with QDoc
6 \nextpage Installing Clang for QDoc
7
8 Qt uses QDoc to generate its documentation set into HTML and DocBook XML
9 formats. QDoc uses a set of configuration files to generate documentation
10 from QDoc comments. The comments have types called
11 \l{writing-topic-commands}{topics} that determine whether a comment is a
12 class documentation or a property documentation. A comment may also have
13 \l{writing-markup}{mark up} to enhance the layout and formatting of the
14 final output.
15
16 There are three essential materials for generating documentation with QDoc:
17 \list
18 \li \c QDoc binary
19 \li \c qdocconf configuration files
20 \li \c Documentation in \c C++, \c QML, and \c .qdoc files
21 \endlist
22
23 \note \l{QDoc Manual}{QDoc} requires \l{http://clang.llvm.org}{Clang}
24 for parsing C++ header and source files, and for parsing the function
25 signatures in \l {fn-command} {\\fn} commands. See \l {Installing Clang for QDoc}
26 for details.
27
28 This section intends to cover the basic necessities for creating a
29 documentation set. Additionally, the guide presents special considerations
30 and options to documenting non-C++ API documentation as well as QML
31 documentation. Finally, the guide will provide a sample project
32 documentation and an example of a QML type documentation.
33
34 For specific QDoc information, consult the
35 \l{QDoc Manual}.
36 \section1 Chapters
37
38 \list 1
39 \li \l{Installing Clang for QDoc}
40 \li \l{Creating QDoc Configuration Files}
41 \li \l{Writing Documentation}
42 \li \l{Categories of Documentation}
43 \list
44 \li \l{C++ Documentation Style}
45 \li \l{QML Documentation Style}
46 \endlist
47 \li \l{How to Resolve QDoc Warnings}
48 \endlist
49
50*/
51
52/*!
53 \page qdoc-guide-conf.html
54 \title Creating QDoc Configuration Files
55 \previouspage Installing Clang for QDoc
56 \nextpage Writing Documentation
57 To generate documentation, QDoc uses configuration files, with the
58 \c qdocconf extension, to store configuration settings.
59
60 The \l{The QDoc Configuration File} article covers the various configuration
61 variables in greater detail.
62
63 \section1 QDoc Configuration Files
64 QDoc's configuration settings can reside in a single \e qdocconf file, but
65 can also be in other qdocconf files. The \c {include(<filepath>)} command
66 allows configuration files to include other configuration files.
67
68 QDoc has two outputs, HTML documentation and documentation in DocBook XML
69 format. The main distinction between the two outputs is that HTML
70 documentation needs to have its HTML styling information in the
71 configuration files. DocBook documentation does not, and a separate process
72 can style the documentation in DocBook at a later time. DocBook therefore
73 more flexible in allowing different styles to apply to the same information.
74
75 To run QDoc, the project configuration file is supplied as an argument.
76 \code
77 qdoc project.qdocconf
78 \endcode
79
80 The project configuration contains information that QDoc uses to create the
81 documentation.
82
83 \section2 Project Information
84
85 QDoc uses the \c project information to generate the documentation.
86 \code
87 project = QDoc Project
88 description = Sample QDoc project
89 \endcode
90
91 \target qdoc-input-output-dir
92 \section2 Input and Output Directories
93
94 Specifying the path to the source directories allow QDoc to find sources and
95 generate documentation.
96
97 \badcode
98 sourcedirs = <path to source code>
99 exampledirs = <path to examples directory>
100 imagedirs = <path to image directory>
101
102 sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
103 headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
104 examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
105 examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng"
106 \endcode
107
108 QDoc will process headers and sources from the ones specified in the
109 \c fileextensions variable.
110
111 Likewise, QDoc needs the path to the output directory. The \c outputformats
112 variable determines the type of documentation. These variables should be
113 in separate configuration files to modularize the documentation build.
114 \badcode
115 outputdir = $SAMPLE_PROJECT/doc/html
116 outputformats = HTML
117 \endcode
118
119 QDoc can resolve the paths relative to the qdocconf file as well as
120 environment variables.
121
122 \note During each QDoc run, the output directory is deleted.
123 \section2 Extra Files
124
125 QDoc will output generated documentation into the directory specified in
126 the \l{Input and Output Directories}{output} directory. It is also possible
127 to specify extra files that QDoc should export.
128
129 \badcode
130 HTML.extraimages = extraImage.png \
131 extraImage2.png
132 \endcode
133
134 The \c extraImage.png and the \c extraImage2.png files will be copied to the
135 HTML output directory.
136
137 \section2 Qt Help Framework Configuration
138
139 QDoc will also export a \e {Qt Help Project} file, in a \c qhp file.
140 The qhp file is then used by the \c qhelpgenerator to package the
141 documentation into a \c qch file. Qt Creator and Qt Assistant reads the qch
142 file to display the documentation.
143
144 The \l {Creating Help Project Files} article covers the configuration
145 options.
146
147 \section2 HTML Configuration
148
149 QDoc has an HTML generator that will export a set of documentation into
150 HTML files using various configuration settings. QDoc will place the
151 generated documentation into the directory specified by the \c outputdir
152 variable.
153
154 \badcode
155 outputformats = HTML
156 outputdir = <path to output directory>
157 \endcode
158
159 QDoc needs to know where the styles and templates for generating HTML
160 are located. Typically, the templates directory contains a \c scripts,
161 \c images, and a \c style directory, containing scripts and CSS files.
162
163 The main configuration variables are:
164 \badcode
165 HTML.postheader
166 HTML.postpostheader
167 HTML.postheader
168 HTML.footer
169
170 HTML.headerstyles
171 HTML.stylesheets = template/style/style.css \
172 template/style/style1.css
173
174 HTML.scripts = template/scripts/script.js
175 \endcode
176
177 The \c{HTML.headerstyles} variable inserts the style information into the
178 HTML file and the \c{HTML.stylesheets} specifies which files QDoc should
179 copy into the output directory. In addition, QDoc will embed the string
180 in the \c postheader, \c footer, and related variables into each HTML file.
181
182 The \l {Format-specific Configuration Variables} article outlines the usage
183 of each variable.
184
185 \section2 QDoc Index Files
186
187 Documentation projects can link to targets in other projects by specifying
188 a set of dependencies, or a set of direct paths to index file(s) this
189 project depends on. When QDoc generates documentation for a project,
190 it will also generate an \c .index file containing URLs to each linkable
191 entity in the project. Other projects can then define a dependency to the
192 index file in order to link to the documentation within that project.
193
194 \b {See also}: \l {depends-variable}{depends} and
195 \l {indexes-variable}{indexes}.
196
197 \section1 Macros and Other Configurations
198
199 Macros for substituting HTML characters exist and are helpful for generating
200 specific HTML-valid characters.
201
202 \badcode
203 macro.pi.HTML = "&Pi;"
204 \endcode
205 The snippet code will replace any instances of \c{\\pi} with \c &Pi; in the
206 HTML file, which will appear as the Greek \pi symbol when viewed in
207 browsers.
208
209 \b {See also:} \l {macro-variable}{macro}.
210
211 \section2 QML Additions
212
213 QDoc is able to parse QML files for QDoc comments. QDoc will parse files
214 with the QML extension, \c{.qml}, if the extension type is included in the
215 \l{Input and Output Directories}{fileextensions} variable.
216
217 Also, the generated HTML files can have a prefix and a suffix following the
218 QML module name, specified in the QDoc configuration file.
219 \badcode
220 outputprefixes = QML
221 outputprefixes.QML = uicomponents-
222 outputsuffixes = QML
223 outputsuffixes.QML = -tp
224 \endcode
225
226 \b {See also}: \l {outputprefixes-variable}{outputprefixes},
227 \l {outputsuffixes-variable}{outputsuffixes}.
228
229*/
230
231/*!
232 \page qdoc-guide-writing.html
233 \title Writing Documentation
234 \previouspage Creating QDoc Configuration Files
235 \nextpage Categories of Documentation
236
237 \section1 QDoc Comments
238
239 Documentation is contained within QDoc \e comments, delimited by
240 \beginqdoc and \endqdoc comments. Note that these are valid comments
241 in C++ and QML.
242
243 Within a QDoc comment, \c {//!} is used as a single-line documentation
244 comment; the comment itself and anything after it, until a newline,
245 is omitted from the generated output.
246
247 QDoc will parse C++ and QML files to look for QDoc comments. To explicitly
248 omit a certain file type, omit it from the
249 \l{Input and Output Directories}{configuration} file.
250
251 \section1 QDoc Commands
252
253 QDoc uses \e commands to retrieve information about the documentation. \c
254 Topic commands determine the type of documentation element, the \c context
255 commands provide hints and information about a topic, and \c markup commands
256 provide information on how QDoc should format a piece of documentation.
257
258 \target writing-topic-commands
259 \section2 QDoc Topics
260 Each QDoc comment must have a \e topic type. A topic distinguishes it from
261 other topics. To specify a topic type, use one of the several
262 \l{Topic Commands}{topic commands}.
263
264 QDoc will collect similar topics and create a page for each one. For
265 example, all the enumerations, properties, functions, and class description
266 of a particular C++ class will reside in one page. A generic page is
267 specified using the \l{page-command}{\\page} command and the filename is the
268 argument.
269
270 Example of topic commands:
271 \list
272 \li \l{enum-command}{\\enum} - for enumeration documentation
273 \li \l{class-command}{\\class} - for C++ class documentation
274 \li \l{qmltype-command}{\\qmltype} - for QML type documentation
275 \li \l{page-command}{\\page} - for creating a page.
276 \endlist
277
278 A QDoc comment can contain multiple topic commands in the same category, with
279 some restrictions. This way, it's possible to write a single comment that
280 documents all overloads of a function (using multiple \l {fn-command}{\\fn}
281 commands), or all properties in a QML property group (using
282 \l {qmlproperty-command}{\\qmlproperty} commands) in one go.
283
284 If a QDoc comment contains multiple topic commands, it's possible to
285 provide additional \e {context commands} for individual topics in
286 follow-up comments:
287
288 \badcode *
289 /\1!
290 \qmlproperty string Type::element.name
291 \qmlproperty int Type::element.id
292
293 \brief Holds the element name and id.
294 \1/
295
296 /\1!
297 \qmlproperty int Type::element.id
298 \readonly
299 \1/
300 \endcode
301
302 Here, the follow-up comment marks the \e element.id property as read-only,
303 while \e element.name remains writable.
304
305 \note A follow-up comment cannot contain any additional text, only
306 \l {writing-context}{context commands} that document the context of
307 the item.
308
309 The \l{page-command}{\\page} command is for creating articles that are not
310 part of source documentation. The command can also accept two arguments: the
311 file name of the article and the documentation type. The possible types are:
312 \list
313 \li \c howto
314 \li \c overview
315 \li \c tutorial
316 \li \c faq
317 \li \c attribution - used for documenting license attributions
318 \li \c article - \e default when there is no type
319 \endlist
320
321 \snippet examples/samples.qdocinc sample-faq
322
323 The \l{Topic Commands} page has information on all of the available topic
324 commands.
325
326 \target writing-context
327 \section2 Topic Contexts
328
329 Context commands give QDoc a hint about the \e context of the topic. For
330 example, if a C++ function is deprecated, then it should be marked as such
331 with the \l{deprecated-command}{\\deprecated} command. Likewise,
332 \l{nextpage-command}{page navigation} and \l{title-command}{page title}
333 give extra page information to QDoc.
334
335 QDoc will create additional links or pages for these contexts. For example,
336 a group is created using the \l{group-command}{\\group} command and the
337 members have the \l{ingroup-command}{\\ingroup} command. The group name is
338 supplied as an argument.
339
340 The \l{Context Commands} page has a listing of all the available context
341 commands.
342
343 \target writing-markup
344 \section2 Documentation Markup
345
346 QDoc can do \e markup of text similar to other markup or
347 documentation tools. QDoc can mark a section of text in \b{bold},
348 when the text is marked up with the \l{b-command}{\\b} command.
349
350 \code
351 \b{This} text will be in \b{bold}.
352 \endcode
353
354 The \l{Markup Commands} page has a full listing of the available markup
355 commands.
356
357 \section1 Anatomy of Documentation
358
359 Essentially, for QDoc to create a page, there must be some essential
360 ingredients present.
361
362 \list
363 \li Assign a topic to a QDoc comment - A comment could be a page, a
364 property documentation, a class documentation, or any of the available
365 \l{Topic Commands}{topic commands}.
366
367 \li Give the topic a context - QDoc can associate certain topics to other
368 pages such as associating deprecated functions when the documentation is
369 marked with \l{deprecated-command}{\\deprecated}.
370
371 \li Mark sections of the document with
372 \l{Markup Commands}{markup commands} - QDoc can create layouts and
373 format the documentation for the documentation.
374 \endlist
375
376 In Qt, the \l{QVector3D} class was documented with the following QDoc
377 comment:
378 \snippet examples/samples.qdocinc qvector3d-class
379
380 It has a constructor, \l{QVector3D::QVector3D()}, which was documented with
381 the following QDoc comment:
382 \snippet examples/samples.qdocinc qvector3d-function
383
384 The different comments may reside in different files and QDoc will collect
385 them depending on their topic and their context. The resulting documentation
386 from the snippets are generated into the \l{QVector3D} class documentation.
387
388 Note that if the documentation immediately precedes the function or class
389 in the source code, then it does not need to have a topic. QDoc will assume
390 that the documentation above the code is the documentation for that code.
391
392 An article is created using \l{page-command}{\\page} command. The first
393 argument is the HTML file that QDoc will create. The topic is supplemented
394 with context commands, the \l{title-command}{\\title} and
395 \l{nextpage-command}{\\nextpage} commands. There are several other
396 QDoc commands such as the \l{list-command}{\\list} command.
397 \snippet examples/samples.qdocinc sample-page
398
399 The section on \l{QDoc Topics}{topic commands} gives an overview on several
400 other topic types.
401
402
403*/
404
405/*!
406 \page qdoc-categories.html
407 \title Categories of Documentation
408 \previouspage Writing Documentation
409 \nextpage How to Resolve QDoc Warnings
410 \brief Describes the different types such as How-To's, Tutorials, Overviews,
411 Examples, and Class Documentation.
412
413 There are several types of predefined documentation \e categories or
414 \e types:
415 \list
416 \li How-To's
417 \li Tutorial
418 \li Overview
419 \li Article
420 \li FAQ (Frequently Asked Questions)
421 \li C++ API Documentation
422 \li QML Type Documentation
423 \li Code Example
424 \endlist
425
426 QDoc has the ability to format a page depending on the type. Further,
427 stylesheets can provide additional control on the display of each category.
428
429 \section1 API Documentation
430 QDoc excels in the creation of API documentation given a set of source code
431 and documentation in QDoc comments. Specifically, QDoc is aware of Qt's
432 architecture and can validate the existence of Qt C++ class, function, or
433 property documentation. QDoc gives warnings and errors if it cannot
434 associate a documentation with a code entity or if a code entity does not
435 have documentation.
436
437 In general, every Qt code entity such as properties, classes, methods,
438 signals, and enumerations have a corresponding
439 \l{qdoc-topics}{topic command}. QDoc will associate the documentation to the
440 source using C++ naming rules.
441
442 QDoc will parse the header files (typically \c .h files) to build a tree of
443 the class structures. Then QDoc will parse the source files and
444 documentation files to attach documentation to the class structure.
445 Afterwards, QDoc will generate a page for the class.
446
447 \note QDoc uses the header files to inform itself about the class and will
448 not properly process QDoc comments in header files.
449
450 \section2 Language Styles
451
452 To produce quality API documentation, the Qt API references follow a
453 particular language guidelines. While the contents of this page demonstrates
454 how to create API documentation, the style guidelines demonstrate how
455 the reference materials follow a consistent use of language.
456
457 \list
458 \li \l{C++ Documentation Style}
459 \li \l{QML Documentation Style}
460 \endlist
461
462 \keyword qml-documentation
463 \section2 Documenting QML Types
464
465 In the world of \l{Qt Quick}{QML}, there are additional entities we need to
466 document such as QML signals, attached properties, and QML methods.
467 Internally, they use Qt technologies, however, QML API documentation
468 requires different layout and naming conventions from the Qt C++ API
469 documentation.
470
471 A list of QML related QDoc commands:
472 \list
473 \li \l{qmlattachedproperty-command}{\\qmlattachedproperty}
474 \li \l{qmlattachedsignal-command}{\\qmlattachedsignal}
475 \li \l{qmlvaluetype-command}{\\qmlvaluetype}
476 \li \l{qmltype-command}{\\qmltype} - creates a QML type documentation
477 \li \l{qmlmethod-command}{\\qmlmethod}
478 \li \l{qmlproperty-command}{\\qmlproperty}
479 \li \l{qmlsignal-command}{\\qmlsignal}
480 \li \l{inherits-command}{\\inherits}
481 \li \l{qmlmodule-command}{\\qmlmodule}
482 \li \l{inqmlmodule-command}{\\inqmlmodule}
483 \li \l{nativetype-command}{\\nativetype}
484
485 \endlist
486
487 \note Remember to enable QML parsing by including the \c{*.qml} filetype in
488 the \l{qdoc-input-output-dir}{fileextension} variable.
489
490 To document a QML type, start by creating a QDoc comment that uses the
491 \l{qmltype-command} {\\qmltype} command as its topic command.
492
493 \section3 QML Parser
494
495 If your QML type is defined in a \e qml file, document it there.
496 If your QML type is represented by a C++ class, document it in the
497 \e cpp file for that C++ class and include an
498 \l{nativetype-command}{\\nativetype} command to specify the
499 name of the C++ class. Don't document a QML type in a \e{cpp} file
500 if the QML type is defined in a \e{qml} file.
501
502 When documenting a QML type in a \e{qml} file, place each QDoc
503 comment directly above the entity to which the comment applies.
504 For example, place the QDoc comment containing the \e{\\qmltype}
505 command (the topic comment) directly above the outer QML type in
506 the \e{qml} file. Place the comment for documenting a QML property
507 directly above the property declaration, and so on for QML signal
508 handlers and QML methods. Note that when documenting QML
509 properties in a \e{qml} file, you don't normally include the
510 \e{\\qmlproperty} command as a topic command (which you must do
511 when documenting QML types in \e{cpp} files), because the QML
512 parser automatically associates each QDoc comment with the next
513 QML declaration it parses. The same is true for QML signal handler
514 and QML method comments. But it is sometimes useful to include one
515 or more \e{\\qmlproperty} commands in the comment, e.g. when the
516 property type is another QML type and you want the user to only
517 use certain properties within that other QML type, but not all of
518 them. But when documenting a property that has an alias, place the
519 QDoc comment for it directly above the alias declaration. In these
520 cases, the QDoc comment \e must contain a \e{\\qmlproperty}
521 command, because that is the only way QDoc can know the type of
522 the aliased property.
523
524 When documenting a QML type in the \e cpp file of its
525 corresponding C++ class (if it has one), you normally place each
526 QDoc comment directly above the entity it documents. However, QDoc
527 does not use the QML parser to parse these files (the C++ parser
528 is used), so these QML QDoc comments can appear anywhere in the
529 \e{cpp} file. Note that QML QDoc comments in \e cpp files \e must
530 use the QML topic commands. i.e., the \l{qmltype-command}
531 {\\qmltype} command \e must appear in the QDoc comment for the
532 QML type, and a \l{qmlproperty-command} {\\qmlproperty} command \e
533 must appear in each QML property QDoc comment.
534
535 \section3 QML Modules
536
537 A QML type belongs to a \e module. The module
538 may include all the related types for a platform or contain a certain
539 version of \l{Qt Quick}. For example, the Qt Quick 2 QML types belong
540 to the Qt Quick 2 module while there is also a Qt Quick 1 module for the older
541 types introduced in Qt 4.
542
543 QML modules allow grouping QML types. The \l{qmltype-command}
544 {\\qmltype} topic command must have an \l{inqmlmodule-command}
545 {\\inqmlmodule} context command to relate the type to a QML
546 module. Similarly, a \l{qmlmodule-command}{\\qmlmodule} topic
547 command must exist in a separate \c{.qdoc} file to create the
548 overview page for the module. The overview page will list the
549 QML types of the QML module.
550
551 The links to the QML types must therefore also contain the module name.
552 For example, if a type called \c TabWidget is in the \c UIComponents
553 module, it must be linked as \c {UIComponents::TabWidget}.
554
555 \section3 Read-only and Internal QML Properties
556
557 QDoc detects QML properties that are marked as \c readonly. Note that the
558 property must be initialized with a value.
559
560 \badcode
561 readonly property int sampleReadOnlyProperty: 0
562 \endcode
563
564 Properties and signals that are not meant for the public interface may
565 be marked with the \l{internal-command}{\\internal} command. QDoc will not
566 publish the documentation in the generated outputs.
567
568 \section1 Articles & Overviews
569
570 Articles and overviews are a style of writing best used for providing
571 summary detail on a topic or concept. It may introduce a technology or
572 discuss how a concept may be applied, but without discussing exact steps
573 in too much detail. However, this type of content could provide the entry
574 point for readers to find instructional and reference materials that do,
575 such as tutorials, examples and class documentation. An example of an
576 overview might be a product page, such as a top level discussion of
577 Qt Quick, individual modules, design principles, or tools.
578
579 To signify that a document is an article, you append the article keyword
580 to the \\page command:
581
582 \snippet examples/samples.qdocinc sample-overview
583
584 The \l{writing-topic-commands}{writing topic commands} section has a listing
585 of the available \\page command arguments.
586
587 \section1 Tutorials, How-To's, FAQ's
588
589 Tutorials, How-To's, and FAQ's are all instructional material, in that they
590 instruct or prescribe to the reader. Tutorials are content designed to guide
591 the reader along a progressive learning path for a concept or technology.
592 How-To's and FAQ's (\e{Frequently Asked Questions}) provide guidance by
593 presenting material in the form of answers to commonly asked topics.
594 How-To's and FAQ's are designed for easy reference and are not necessarily
595 presented in a linear progression.
596
597 To create these types, mark the pages by providing a \c type argument to the
598 \l{page-command}{\\page} command. The \c type argument is the second
599 argument, with the file name being the first.
600 \snippet examples/samples.qdocinc sample-faq
601
602 The \l{writing-topic-commands}{writing topic commands} section has a listing
603 of the available \\page command arguments.
604
605 \section1 Code Examples
606 Examples are an effective way to demonstrate practical usage of a given
607 technology or concept. When it comes to middleware this is usually in the
608 form of an application using simple code and clear explanations of what the
609 code is doing. Any module, API, project, pattern etc. should have at least
610 one good example.
611
612 An example may have an accompanying tutorial. The tutorial instructs and
613 describes the code, while the code example is the code content that users
614 may study. Code examples may have accompanying text that are not in the
615 tutorial.
616
617 QDoc will create a page containing the example code with a description
618 using the \l{example-command}{\\example} command.
619
620 \snippet examples/samples.qdocinc sample-example
621
622 QDoc will use the directory specified in the input
623 \l{Input and Output Directories}{exampledirs} variable to find the Qt
624 Project (\c .pro) file to generate the example files. The generated HTML
625 will have the filename, \c {declarative-ui-components-tabwidget.html}. QDoc
626 will also list all of the example code.
627
628 \note The example's project file must be the same as the
629 directory name.
630*/
631
632
633/*!
634 \page qdoc-guide-clang.html
635 \title Installing Clang for QDoc
636 \previouspage Getting Started with QDoc
637 \nextpage Creating QDoc Configuration Files
638
639 QDoc uses Clang when parsing C++ files as well as function signatures in
640 \l {fn-command} {\\fn} commands. Clang is part of
641 \l {https://llvm.org/}{the LLVM Compiler Infrastructure Project}.
642 If you're going to build QDoc from source, you must install
643 \l{http://clang.llvm.org}{Clang 17.0} or later.
644
645 You can get Clang through various channels:
646
647 \list
648 \li Qt provides the
649 \l{http://download.qt.io/development_releases/prebuilt/libclang/qt}
650 {prebuilt Clang packages} that are used for the Qt binaries in the
651 online installer. These let you link LLVM/Clang libraries statically,
652 but only support Release builds on Windows.
653 \li Linux distributions often provide a package called \e libclang-dev or
654 \e libclang-devel. Qt's build system instructs CMake to look for
655 \e {ClangConfig.cmake}, so make sure you install the package that
656 provides this file if you want to build QDoc. Running QDoc requires
657 only \e libclang.
658 \li On macOS, you can also use Homebrew's
659 \l{https://formulae.brew.sh/formula/llvm}{llvm formula}.
660 \endlist
661
662 \note the prebuilt binaries from \l{http://releases.llvm.org/download.html}
663 cannot be used, as they miss certain components required by QDoc.
664
665 If you install Clang in a custom location you need to tell CMake where
666 to find it. This can be done by specifying your LLVM installation path
667 using the \c LLVM_INSTALL_DIR environment variable when configuring Qt.
668 Alternatively, you can add the installation path to the \c CMAKE_PREFIX_PATH
669 CMake cache variable.
670*/