aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-01-03 13:30:51 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-01-04 12:23:41 +0000
commitaa9308d1d172a51a3e4356b8831b9f28fc68086e (patch)
treea7be2b09edb02a82d02b190e56794863d90e2eb9
parentf2696acaf7bef9d3427a357dd28d1ec52231024b (diff)
Doc: improve Style/FallbackStyle documentation
Link to relevant documentation and add entries for the Controls section to the configuration file docs. Task-number: QTBUG-65445 Change-Id: I175866167e36403475520ea4de0cb299aae542d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc31
-rw-r--r--src/quickcontrols2/qquickstyle.cpp4
2 files changed, 33 insertions, 2 deletions
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
index 36bce98d..ca70ed2f 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
@@ -53,16 +53,43 @@
Primary=BlueGrey
\endcode
- \l {Material style} specific values that can be specified in a \c Material
+ \section1 Controls Section
+
+ The following values can be specified in a \c Controls section of the
+ configuration file:
+
+ \table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Style
+ \li Specifies the style to run the application with.
+ The value can be the name of one of the \l {Available Styles}{built-in styles}
+ or a \l {Creating a Custom Style}{custom style}.
+ \row
+ \li \c FallbackStyle
+ \li Specifies the style to use for controls that are not implemented.
+ The style must be one of the \l {Available Styles}{built-in styles}.
+ By default, the \l {Default Style}{Default} style is used.
+ \endtable
+
+ \section1 Material Section
+
+ The following \l {Material style} specific values can be specified 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
+ \section1 Universal Section
+
+ The following \l {Universal style} specific values can be specified in a \c Universal
section of the configuration file:
\include qquickuniversalstyle.qdocinc conf
+ \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:
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 64289d46..c57dc7ac 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -343,6 +343,8 @@ QString QQuickStyle::path()
\note The style must be configured \b before loading QML that imports Qt Quick Controls 2.
It is not possible to change the style after the QML types have been registered.
+
+ \sa setFallbackStyle(), {Using Styles in Qt Quick Controls 2}
*/
void QQuickStyle::setStyle(const QString &style)
{
@@ -365,6 +367,8 @@ void QQuickStyle::setStyle(const QString &style)
The fallback style can be also specified by setting the \c QT_QUICK_CONTROLS_FALLBACK_STYLE
\l {Supported Environment Variables in Qt Quick Controls 2}{environment variable}.
+
+ \sa setStyle(), {Using Styles in Qt Quick Controls 2}
*/
void QQuickStyle::setFallbackStyle(const QString &style)
{