Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

QMLDocumentationStyle: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=<span class="caps">QML</span> Documentation Style=
h1. QML Documentation Style


This page is part of the [[QtWritingGuidelines|Qt Writing Guidelines]].
This page is part of the [[QtWritingGuidelines| Qt Writing Guidelines]].


Though there are exceptions, these guidelines should be followed. Keeping that in mind, at least '''be consistent within the page'''. Meaning, the class member documentation should have the same style.
Though there are exceptions, these guidelines should be followed. Keeping that in mind, at least '''be consistent within the page'''. Meaning, the class member documentation should have the same style.


QDoc can process <span class="caps">QML</span> types defined as C++ classes and <span class="caps">QML</span> types defined in ''.qml'' files. For C++ classes documented as <span class="caps">QML</span> types, the QDoc comments are in the ''.cpp'' file while <span class="caps">QML</span> types defined in <span class="caps">QML</span> are in the ''.qml'' file. The C++ classes must also be documented documented with the <span class="caps">QML</span> [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html topic commands] ''[doc-snapshot.qt.io]'':
QDoc can process QML types defined as C++ classes and QML types defined in ''.qml'' files. For C++ classes documented as QML types, the QDoc comments are in the ''.cpp'' file while QML types defined in QML are in the ''.qml'' file. The C++ classes must also be documented documented with the QML &quot;topic commands&amp;quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html:


* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedproperty \qmlattachedproperty] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedproperty
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedsignal \qmlattachedsignal] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedsignal
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedsignal \qmlbasictype] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlattachedsignal
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmltype \qmltype] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmltype
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmethod \qmlmethod] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmethod
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty \qmlproperty] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlsignal \qmlsignal] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlsignal
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmodule \qmlmodule] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmodule
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#inqmlmodule \inqmlmodule] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#inqmlmodule
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#instantiates \instantiates] ''[doc-snapshot.qt.io]''
* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#instantiates


For <span class="caps">QML</span> types defined in ''.qml'' files, QDoc will parse the <span class="caps">QML</span> and determine the properties, signals, and the type within the <span class="caps">QML</span> definition. The QDoc<br /> block then needs to be immediately above the declaration. For <span class="caps">QML</span> types implemented in C++, QDoc will output warnings if the C++ class documentation does not exist.
For QML types defined in ''.qml'' files, QDoc will parse the QML and determine the properties, signals, and the type within the QML definition. The QDoc<br />block then needs to be immediately above the declaration. For QML types implemented in C+'', QDoc will output warnings if the C''+ class documentation does not exist.


==<span class="caps">QML</span> Module Versions==
== QML Module Versions ==


QDoc considers the version specified in the \qmlmodule command as the import statement. Types which belong to the module do not need to specify the version, only the module name.
QDoc considers the version specified in the command as the import statement. Types which belong to the module do not need to specify the version, only the module name.


There are two versions important for the user to know: Qt version and <span class="caps">QML</span> module version.
<code>


Use
/*!<br /> QtQuick.Controls 1.1<br /> #this is the same as the import statement


* “\since 5.3” for \qmltype
'''/
* “\since &lt;qml module&gt; &lt;version&gt;” for \qmlproperty and the members.
<br />/'''!<br /> Button<br /> QtQuick.Controls<br /> #QDoc will associate this Button to whatever version QtQuick.Controls has. (only one version per release)


“\since QtQuick 2.3” in a property documentation block will generate: “This property was introduced in QtQuick 2.3”
'''/<br /></code>
<br />There are two versions important for the user to know: Qt version and QML module version.
<br />Use<br />''' &quot;5.3&amp;quot; for  &quot;&lt;qml module&amp;gt; &lt;version&amp;gt;&quot; for and the members.


==<span class="caps">QML</span> Types==
&quot;QtQuick 2.3&amp;quot; in a property documentation block will generate: &quot;This property was introduced in QtQuick 2.3&amp;quot;


The [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmltype-command \qmltype] ''[doc-snapshot.qt.io]'' command is for <span class="caps">QML</span> type documentation.
== QML Types ==


Some commonly used commands and [http://doc-snapshot.qt.io/qt5-stable/14-qdoc-commands-contextcommands.html context commands] ''[doc-snapshot.qt.io]'':
The &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmltype-command command is for QML type documentation.


* [http://doc-snapshot.qt.io/qt5-stable/11-qdoc-commands-specialcontent.html#brief-command \brief] ''[doc-snapshot.qt.io]'' – the brief description '''mandatory'''
<code><br /> TextEdit<br /> QQuickTextEdit<br /> QtQuick<br /> 4.8<br /> qtquick-visual<br /> qtquick-input<br /> Item<br /> Displays multiple lines of editable formatted text
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#inqmlmodule-command \inqmlmodule] ''[doc-snapshot.qt.io]'' '''mandatory'''
* [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#instantiates-command \instantiates] ''[doc-snapshot.qt.io]'' – accepts the C++ class which implements the <span class="caps">QML</span> type as the argument. For types implemented in <span class="caps">QML</span>, this is not needed.
* [http://doc-snapshot.qt.io/qt5-stable/16-qdoc-commands-status.html#since-command \since] ''[doc-snapshot.qt.io]'' – Add the Qt version the type was introduced in. '''mandatory''' (see '''Note:''' below about backdating <span class="caps">API</span>s)


'''Note:''' It was decided that we will not backdate <span class="caps">API</span>s, so only add the \since with the version number of an upcoming release. See https://codereview.qt.io/#change,43797
The TextEdit item displays a block of editable, formatted text.


The '''brief description''' provides a summary for the <span class="caps">QML</span> type. The brief does not need to be a complete sentence and may start with a verb. QDoc will append the brief description onto the <span class="caps">QML</span> type in tables and generated lists. '''Don’t forget the period at the end.'''
It can display both plain and rich text. For example:


Here are some alternate verbs for the brief statement:
TextEdit {<br /> width: 240<br /> text: &quot;&lt;b&amp;gt;Hello&amp;lt;/b&amp;gt; &lt;i&amp;gt;World!&lt;/i&amp;gt;&quot;<br /> font.family: &quot;Helvetica&amp;quot;<br /> font.pointSize: 20<br /> color: &quot;blue&amp;quot;<br /> focus: true<br /> }<br />


* “Provides…”
declarative-textedit.gif
* “Specifies…”
* “Describes…”


The '''detailed description''' follows the brief and may contain images, snippet, and link to other documentation.
… omitted detailed description
 
Text, TextInput, {examples/quick/text/textselection}{Text Selection example}<br /></code>
 
Some commonly used commands and &quot;context commands&amp;quot;:http://doc-snapshot.qt.io/qt5-stable/14-qdoc-commands-contextcommands.html:<br />* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/11-qdoc-commands-specialcontent.html#brief-command - the brief description '''mandatory'''<br />* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#inqmlmodule-command '''mandatory'''<br />* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#instantiates-command - accepts the C++ class which implements the QML type as the argument. For types implemented in QML, this is not needed.<br />* &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/16-qdoc-commands-status.html#since-command - Add the Qt version the type was introduced in. '''mandatory''' (see '''Note:''' below about backdating APIs)
 
'''Note:''' It was decided that we will not backdate APIs, so only add the with the version number of an upcoming release. See https://codereview.qt.io/#change,43797
 
The '''brief description''' provides a summary for the QML type. The brief does not need to be a complete sentence and may start with a verb. QDoc will append the brief description onto the QML type in tables and generated lists. '''Don't forget the period at the end.'''
 
<code><br />ColorAnimation<br />Animates changes in color values.<br /></code>


==Properties==
Here are some alternate verbs for the brief statement:<br />* &quot;Provides…&quot;<br />* &quot;Specifies…&quot;<br />* &quot;Describes…&quot;


The property description focuses on what the property ''does''. Property documentation usually starts with “This property…” but for certain properties, these are the common expressions:
The '''detailed description''' follows the brief and may contain images, snippet, and link to other documentation.


* “This property holds…”
== Properties ==
* “This property describes…”
* “This property represents…”
* “Returns \c true when… and \c false when…” – for properties that are marked ''read-only''.
* “Sets the…” – for properties that configure a type.


==Aliases==
The property description focuses on what the property ''does''. Property documentation usually starts with &quot;This property…&quot; but for certain properties, these are the common expressions:<br />* &quot;This property holds…&quot;<br />* &quot;This property describes…&quot;<br />* &quot;This property represents…&quot;<br />* &quot;Returns rue when… and alse when…&quot; - for properties that are marked ''read-only''.<br />* &quot;Sets the…&quot; - for properties that configure a type.


The QDoc parser cannot guess the type of the alias, therefore, the type must be fully documented with the [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty \qmlproperty] ''[doc-snapshot.qt.io]'' command.
== Aliases ==


==Signals and Handlers Documentation==
The QDoc parser cannot guess the type of the alias, therefore, the type must be fully documented with the &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty command.


<span class="caps">QML</span> signals are documented either in the <span class="caps">QML</span> file or in the C++ implementation with the [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlsignal-command \qmlsignal] ''[doc-snapshot.qt.io]'' command. Signal documentation must include the condition for emitting the signal, mention the corresponding signal handler, and document whether the signal accepts a parameter.
== Signals and Handlers Documentation ==


These are the possible documentation styles for signals:
QML signals are documented either in the QML file or in the C++ implementation with the &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlsignal-command command. Signal documentation must include the condition for emitting the signal, mention the corresponding signal handler, and document whether the signal accepts a parameter.


* “This signal is triggered when…”
<code><br />/*<br /> This signal is emitted when the user clicks the button. A click is defined<br /> as a press followed by a release. The corresponding handler is<br /> nClicked.<br />'''/<br /></code>
* “Triggered when…”
<br />These are the possible documentation styles for signals:<br />''' &quot;This signal is triggered when…&quot;<br />* &quot;Triggered when…&quot;<br />* &quot;Emitted when…&quot;
* “Emitted when…”


==Read-Only Properties==
== Read-Only Properties ==


To mark that a property is a ''read-only'' property, typethe '''\readonly''' command in the property documentation. QDoc then notes that the property is a read-only property.
To mark that a property is a ''read-only'' property, typethe * command in the property documentation. QDoc then notes that the property is a read-only property.


For properties that are declared in <span class="caps">QML</span> files with the '''readonly''' keyword, QDoc can detect that it is a read-only property and will automatically add the read-only marking.
For properties that are declared in QML files with the '''readonly''' keyword, QDoc can detect that it is a read-only property and will automatically add the read-only marking.


==Methods and JavaScript Functions==
== Methods and JavaScript Functions ==


Typically, function documentation immediately precedes the implementation of the function in the ''.cpp'' file. The [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html topic command] ''[doc-snapshot.qt.io]'' for functions is [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmethod-command \qmlmethod] ''[doc-snapshot.qt.io]''. For functions in <span class="caps">QML</span> or JavaScript, the documentation must reside immediately above the function declaration.
Typically, function documentation immediately precedes the implementation of the function in the ''.cpp'' file. The &quot;topic command&amp;quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html for functions is &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmethod-command. For functions in QML or JavaScript, the documentation must reside immediately above the function declaration.


The function documentation starts with a verb, indicating the operation the function performs.
The function documentation starts with a verb, indicating the operation the function performs.


Some common verbs for function documentation:
<code><br />/*<br /> QtQuick2::ListModel::remove(int index, int count = 1)
 
Deletes the content at index from the model.


* “Copies…” – for constructors
clear()<br />*/<br />void QQuickListModel::remove(QQmlV8Function '''args)<br /></code>
* “Destroys…” – for destructors
<br />Some common verbs for function documentation:<br />''' &quot;Copies…&quot; - for constructors<br />* &quot;Destroys…&quot; - for destructors<br />* &quot;Returns…&quot; - for accessor functions
* “Returns…” – for accessor functions


The function documentation must document:
The function documentation must document:<br />* the return type<br />* the parameters<br />* the actions of the functions


* the return type
The &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#a-command command marks the parameter in the documentation. The return type documentation should link to the type documentation or be marked with the &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#c-command command in the case of boolean values.
* the parameters
* the actions of the functions


The [http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#a-command \a] ''[doc-snapshot.qt.io]'' command marks the parameter in the documentation. The return type documentation should link to the type documentation or be marked with the [http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#c-command \c] ''[doc-snapshot.qt.io]'' command in the case of boolean values.
== Enumerations ==


==Enumerations==
QML enumerations are documented as QML properties with the &quot;&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty-command command. The type of the property is ''enumeration''.


<span class="caps">QML</span> enumerations are documented as <span class="caps">QML</span> properties with the [http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty-command \qmlproperty] ''[doc-snapshot.qt.io]'' command. The type of the property is ''enumeration''.
<code><br />/*!<br />enumeration QtQuick2::Text::font.weight


To begin the description, use:
Sets the font's weight.


* “This enumeration…”
The weight can be one of:


The QDoc comment lists the values of the enumeration. If the enumeration is implemented in C++, the documentation may link to the corresponding C++ enumeration. However, the QDoc comment should advise that the enumeration is a C++ enumeration.
Font.Light<br />Font.Normal - the default<br />Font.DemiBold<br />Font.Bold<br />Font.Black<br />'''/<br /></code>
<br />To begin the description, use:<br />''' &quot;This enumeration…&quot;

Revision as of 10:48, 24 February 2015

h1. QML Documentation Style

This page is part of the Qt Writing Guidelines.

Though there are exceptions, these guidelines should be followed. Keeping that in mind, at least be consistent within the page. Meaning, the class member documentation should have the same style.

QDoc can process QML types defined as C++ classes and QML types defined in .qml files. For C++ classes documented as QML types, the QDoc comments are in the .cpp file while QML types defined in QML are in the .qml file. The C++ classes must also be documented documented with the QML "topic commands&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html:

For QML types defined in .qml files, QDoc will parse the QML and determine the properties, signals, and the type within the QML definition. The QDoc
block then needs to be immediately above the declaration. For QML types implemented in C+, QDoc will output warnings if the C+ class documentation does not exist.

QML Module Versions

QDoc considers the version specified in the command as the import statement. Types which belong to the module do not need to specify the version, only the module name.

/*!<br /> QtQuick.Controls 1.1<br /> #this is the same as the import statement

'''/
<br />/'''!<br /> Button<br /> QtQuick.Controls<br /> #QDoc will associate this Button to whatever version QtQuick.Controls has. (only one version per release)

'''/<br />


There are two versions important for the user to know: Qt version and QML module version.
Use
"5.3&quot; for "<qml module&gt; <version&gt;" for and the members.

"QtQuick 2.3&quot; in a property documentation block will generate: "This property was introduced in QtQuick 2.3&quot;

QML Types

The "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmltype-command command is for QML type documentation.

<br /> TextEdit<br /> QQuickTextEdit<br /> QtQuick<br /> 4.8<br /> qtquick-visual<br /> qtquick-input<br /> Item<br /> Displays multiple lines of editable formatted text

The TextEdit item displays a block of editable, formatted text.

It can display both plain and rich text. For example:

TextEdit {<br /> width: 240<br /> text: &quot;&lt;b&amp;gt;Hello&amp;lt;/b&amp;gt; &lt;i&amp;gt;World!&lt;/i&amp;gt;&quot;<br /> font.family: &quot;Helvetica&amp;quot;<br /> font.pointSize: 20<br /> color: &quot;blue&amp;quot;<br /> focus: true<br /> }<br /> 

declarative-textedit.gif

 omitted detailed description

Text, TextInput, {examples/quick/text/textselection}{Text Selection example}<br />

Some commonly used commands and "context commands&quot;:http://doc-snapshot.qt.io/qt5-stable/14-qdoc-commands-contextcommands.html:
* "":http://doc-snapshot.qt.io/qt5-stable/11-qdoc-commands-specialcontent.html#brief-command - the brief description mandatory
* "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#inqmlmodule-command mandatory
* "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#instantiates-command - accepts the C++ class which implements the QML type as the argument. For types implemented in QML, this is not needed.
* "":http://doc-snapshot.qt.io/qt5-stable/16-qdoc-commands-status.html#since-command - Add the Qt version the type was introduced in. mandatory (see Note: below about backdating APIs)

Note: It was decided that we will not backdate APIs, so only add the with the version number of an upcoming release. See https://codereview.qt.io/#change,43797

The brief description provides a summary for the QML type. The brief does not need to be a complete sentence and may start with a verb. QDoc will append the brief description onto the QML type in tables and generated lists. Don't forget the period at the end.

<br />ColorAnimation<br />Animates changes in color values.<br />

Here are some alternate verbs for the brief statement:
* "Provides…"
* "Specifies…"
* "Describes…"

The detailed description follows the brief and may contain images, snippet, and link to other documentation.

Properties

The property description focuses on what the property does. Property documentation usually starts with "This property…" but for certain properties, these are the common expressions:
* "This property holds…"
* "This property describes…"
* "This property represents…"
* "Returns rue when… and alse when…" - for properties that are marked read-only.
* "Sets the…" - for properties that configure a type.

Aliases

The QDoc parser cannot guess the type of the alias, therefore, the type must be fully documented with the "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty command.

Signals and Handlers Documentation

QML signals are documented either in the QML file or in the C++ implementation with the "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlsignal-command command. Signal documentation must include the condition for emitting the signal, mention the corresponding signal handler, and document whether the signal accepts a parameter.

<br />/*<br /> This signal is emitted when the user clicks the button. A click is defined<br /> as a press followed by a release. The corresponding handler is<br /> nClicked.<br />'''/<br />


These are the possible documentation styles for signals:
"This signal is triggered when…"
* "Triggered when…"
* "Emitted when…"

Read-Only Properties

To mark that a property is a read-only property, typethe * command in the property documentation. QDoc then notes that the property is a read-only property.

For properties that are declared in QML files with the readonly keyword, QDoc can detect that it is a read-only property and will automatically add the read-only marking.

Methods and JavaScript Functions

Typically, function documentation immediately precedes the implementation of the function in the .cpp file. The "topic command&quot;:http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html for functions is "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlmethod-command. For functions in QML or JavaScript, the documentation must reside immediately above the function declaration.

The function documentation starts with a verb, indicating the operation the function performs.

<br />/*<br /> QtQuick2::ListModel::remove(int index, int count = 1)

Deletes the content at index from the model.

clear()<br />*/<br />void QQuickListModel::remove(QQmlV8Function '''args)<br />


Some common verbs for function documentation:
"Copies…" - for constructors
* "Destroys…" - for destructors
* "Returns…" - for accessor functions

The function documentation must document:
* the return type
* the parameters
* the actions of the functions

The "":http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#a-command command marks the parameter in the documentation. The return type documentation should link to the type documentation or be marked with the "":http://doc-snapshot.qt.io/qt5-stable/04-qdoc-commands-textmarkup.html#c-command command in the case of boolean values.

Enumerations

QML enumerations are documented as QML properties with the "":http://doc-snapshot.qt.io/qt5-stable/13-qdoc-commands-topics.html#qmlproperty-command command. The type of the property is enumeration.

<br />/*!<br />enumeration QtQuick2::Text::font.weight

Sets the font's weight.

The weight can be one of:

Font.Light<br />Font.Normal - the default<br />Font.DemiBold<br />Font.Bold<br />Font.Black<br />'''/<br />


To begin the description, use:
"This enumeration…"