aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc/src/qmltypereference.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/doc/src/qmltypereference.qdoc')
-rw-r--r--src/quick/doc/src/qmltypereference.qdoc103
1 files changed, 40 insertions, 63 deletions
diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc
index a2c913de49..69d45a06de 100644
--- a/src/quick/doc/src/qmltypereference.qdoc
+++ b/src/quick/doc/src/qmltypereference.qdoc
@@ -17,11 +17,11 @@ import QtQuick
\endqml
Visit the \l {Qt Quick} module documentation for more
-information about the concepts which are central to \c QtQuick.
+information about the concepts that are central to \c QtQuick.
\section1 Submodules
- Qt Quick includes several submodules which contain additional types.
+ Qt Quick includes several submodules that contain additional types:
\list
\li \l{Qt Quick Local Storage QML Types}{Local Storage} - a submodule
@@ -33,6 +33,12 @@ information about the concepts which are central to \c QtQuick.
\li \l{Qt Quick Layouts QML Types}{Layouts} - contains types that are used
to arrange items in the user interface
\li \l{Qt Quick Test QML Types}{Tests} - types for testing QML applications.
+ \li \l{Qt Quick Effects QML Types}{Effects} - provides types for applying
+ one or more simple graphical effects to Qt Quick items.
+ \li \l{Qt Quick Shapes QML Types}{Shapes} - provides types for rendering vector shapes in
+ a Qt Quick scene.
+ \li \l{Qt Quick Vector Image QML Types}{Vector Image} - provides types for displaying vector
+ image files.
\endlist
\target value-types
@@ -108,7 +114,7 @@ available when you import \c QtQuick.
\section1 SVG Color Reference
The following table lists the available
- \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG colors}:
+ \l {https://www.w3.org/TR/css-color-3/#svg-color}{SVG colors}:
\include svg-colors.qdocinc
@@ -151,13 +157,19 @@ available when you import \c QtQuick.
\li \l bool \c font.kerning
\li \l bool \c font.preferShaping
\li \l enumeration \c font.hintingPreference
+ \li \c object \l [QML] {QtQuick::Text::}{font.features}
\li \l string \c font.styleName
+ \li \c object \c [QML] {QtQuick::Text::}{font.variableAxes}
\endlist
Example:
- \qml
- Text { font.family: "Helvetica"; font.pointSize: 13; font.bold: true }
- \endqml
+
+ \snippet qml/font.qml text
+
+ As \c font is a \l {QML_STRUCTURED_VALUE}{structured value} type, it can
+ also be constructed with a JavaScript object:
+
+ \snippet qml/font.qml structured-value-construction
When integrating with C++, note that any QFont value
\l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically
@@ -165,71 +177,36 @@ available when you import \c QtQuick.
This value type is provided by the QtQuick import.
- Font weighting is classified on a scale from 0 to 99, where a weight of 0 is ultralight,
- and 99 is extremely black. The following values are supported:
+ Numerical values for font weights follow the CSS specification, where a
+ weight of 100 is extremely light, and 900 is extremely bold.
+ The following values are supported:
- \table
- \row
- \li \c Font.Thin
- \li 0
- \row
- \li \c Font.ExtraLight
- \li 12
- \row
- \li \c Font.Light
- \li 25
- \row
- \li \c Font.Normal
- \li 50
- \row
- \li \c Font.Medium
- \li 57
- \row
- \li \c Font.DemiBold
- \li 63
- \row
- \li \c Font.Bold
- \li 75
- \row
- \li \c Font.ExtraBold
- \li 81
- \row
- \li \c Font.Black
- \li 87
- \endtable
+ \value Font.Thin 100
+ \value Font.ExtraLight 200
+ \value Font.Light 300
+ \value Font.Normal 400
+ \value Font.Medium 500
+ \value Font.DemiBold 600
+ \value Font.Bold 700
+ \value Font.ExtraBold 800
+ \value Font.Black 900
Capitalization supports the following values:
- \table
- \row
- \li \c Font.MixedCase
- \li No capitalization change is applied.
- \row
- \li \c Font.AllUppercase
- \li Alters the text to be rendered in all uppercase type.
- \row
- \li \c Font.AllLowercase
- \li Alters the text to be rendered in all lowercase type.
- \row
- \li \c Font.SmallCaps
- \li Alters the text to be rendered in small-caps type.
- \row
- \li \c Font.Capitalize
- \li Alters the text to be rendered with the first character of each word as an uppercase character.
- \endtable
+ \value Font.MixedCase No capitalization change is applied.
+ \value Font.AllUppercase Alters the text to be rendered in all uppercase type.
+ \value Font.AllLowercase Alters the text to be rendered in all lowercase type.
+ \value Font.SmallCaps Alters the text to be rendered in small-caps type.
+ \value Font.Capitalize Alters the text to be rendered with the first character of each word as an uppercase character.
Setting the hinting preference only has an effect when using the "NativeRendering" render type.
The property supports the following values:
- \list
- \value Font.PreferDefaultHinting - Use the default hinting level for the target platform.
- \value Font.PreferNoHinting - If possible, render text without hinting the outlines
- of the glyphs.
- \value Font.PreferVerticalHinting - If possible, render text with no horizontal hinting,
- but align glyphs to the pixel grid in the vertical direction.
- \value Font.PreferFullHinting - If possible, render text with hinting in both horizontal and
- vertical directions.
- \endlist
+ \value Font.PreferDefaultHinting Use the default hinting level for the target platform.
+ \value Font.PreferNoHinting If possible, render text without hinting the outlines of the glyphs.
+ \value Font.PreferVerticalHinting If possible, render text with no horizontal hinting,
+ but align glyphs to the pixel grid in the vertical direction.
+ \value Font.PreferFullHinting If possible, render text with hinting in both horizontal and vertical directions.
\sa {QML Value Types}
*/