aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc')
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc155
1 files changed, 151 insertions, 4 deletions
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
index 36bce98d..23e52705 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
@@ -53,16 +53,163 @@
Primary=BlueGrey
\endcode
- \l {Material style} specific values that can be specified in a \c Material
- section of the configuration file:
+ \section1 Imagine Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Imagine style} in an \c Imagine section of the configuration file:
+
+ \include qquickimaginestyle.qdocinc conf
+
+ \section1 Material Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Material style} in a \c Material section of the configuration file:
\include qquickmaterialstyle.qdocinc conf
- \l {Universal style} specific values that can be specified in a \c Universal
- section of the configuration file:
+ \section1 Universal Style Configuration
+
+ The following table lists values that can be used to configure the
+ \l {Universal style} in a \c Universal section of the configuration file:
\include qquickuniversalstyle.qdocinc conf
+ \section1 Font Configuration
+
+ The default \l {Control::font}{font} can be specified in a \c Font sub-group
+ in each style's section in the configuration file. The \c Font sub-group can
+ be defined in two alternative ways:
+
+ \code
+ [Default]
+ Font\Family=Open Sans
+ Font\PixelSize=20
+
+ [Material\Font]
+ Family=Open Sans
+ PixelSize=20
+ \endcode
+
+ Supported font attributes:
+ \table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Family
+ \li The \l {QFont::family}{font family}.
+ \row
+ \li \c PointSize
+ \li The \l {QFont::pointSizeF}{point size}.
+ \row
+ \li \c PixelSize
+ \li The \l {QFont::pixelSize}{pixel size}.
+ \row
+ \li \c StyleHint
+ \li The \l {QFont::styleHint}{style hint}.
+ Available values: \c SansSerif, \c Helvetica, \c Serif, \c Times, \c TypeWriter, \c Courier,
+ \c OldEnglish, \c Decorative, \c Monospace, \c Fantasy, \c Cursive.
+ \row
+ \li \c Weight
+ \li The \l {QFont::}{weight}. Qt uses a weighting scale from \c 0 to \c 99 similar to,
+ but not the same as, the scales used in Windows or CSS. A weight of \c 0 will be thin,
+ whilst \c 99 will be extremely black.
+ Available pre-defined weights: \c Thin (0), \c ExtraLight (12), \c Light (25), \c Normal (50),
+ \c Medium (57), \c DemiBold (63), \c Bold (75), \c ExtraBold (81),
+ \c Black (87).
+ \row
+ \li \c Style
+ \li The \l {QFont::}{style}.
+ Available values: \c StyleNormal, \c StyleItalic, \c StyleOblique.
+ \endtable
+
+ \section1 Palette Configuration
+
+ The default \l {Control::palette}{palette} can be specified in a \c Palette sub-group
+ in each style's section in the configuration file. The \c Palette sub-group can be
+ defined in two alternative ways:
+
+ \code
+ [Fusion]
+ Palette\Window=#dedede
+ Palette\WindowText=#212121
+ \endcode
+
+ or:
+ \code
+ [Fusion\Palette]
+ Window=#dedede
+ WindowText=#212121
+ \endcode
+
+ Supported palette attributes:
+ \table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \l {QPalette::ColorRole}{\c Window}
+ \li A general background color.
+ \row
+ \li \l {QPalette::ColorRole}{\c WindowText}
+ \li A general foreground color.
+ \row
+ \li \l {QPalette::ColorRole}{\c Base}
+ \li Used mostly as the background color for text editor controls and items views.
+ It is usually white or another light color.
+ \row
+ \li \l {QPalette::ColorRole}{\c Text}
+ \li The foreground color used with \c Base. This is usually the same as the \c WindowText,
+ in which case it must provide good contrast with \c Window and \c Base.
+ \row
+ \li \l {QPalette::ColorRole}{\c Button}
+ \li The general button background color. This background can be different from \c Window
+ as some styles require a different background color for buttons.
+ \row
+ \li \l {QPalette::ColorRole}{\c ButtonText}
+ \li A foreground color used with the \c Button color.
+ \row
+ \li \l {QPalette::ColorRole}{\c BrightText}
+ \li A text color that is very different from \c WindowText, and contrasts well with e.g. \c Dark.
+ Typically used for text that needs to be drawn where \c Text, \c WindowText or \c ButtonText
+ would give poor contrast, such as on highlighted buttons.
+ \row
+ \li \l {QPalette::ColorRole}{\c ToolTipBase}
+ \li Used as the background color for tooltips.
+ \row
+ \li \l {QPalette::ColorRole}{\c ToolTipText}
+ \li Used as the foreground color for tooltips.
+
+ \row
+ \li \l {QPalette::ColorRole}{\c Light}
+ \li Lighter than \c Button.
+ \row
+ \li \l {QPalette::ColorRole}{\c Midlight}
+ \li Between \c Button and \c Light.
+ \row
+ \li \l {QPalette::ColorRole}{\c Dark}
+ \li Darker than \c Button.
+ \row
+ \li \l {QPalette::ColorRole}{\c Mid}
+ \li Between \c Button and \c Dark.
+ \row
+ \li \l {QPalette::ColorRole}{\c Shadow}
+ \li A very dark color.
+
+ \row
+ \li \l {QPalette::ColorRole}{\c Highlight}
+ \li A color to indicate a selected item or the current item.
+ \row
+ \li \l {QPalette::ColorRole}{\c HighlightedText}
+ \li A text color that contrasts with \c Highlight.
+
+ \row
+ \li \l {QPalette::ColorRole}{\c Link}
+ \li A text color used for hyperlinks.
+ \endtable
+
+ \section1 Using the Configuration File in a Project
+
In order to make it possible for Qt Quick Controls 2 to find the configuration file,
it must be built into application's resources using the \l {The Qt Resource System}.
Here's an example \c .qrc file: