aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-26 12:39:29 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-26 10:49:06 +0000
commit41ec11a8157b9f1cbbc75ab8f68a2e08d24280d9 (patch)
tree7fd45f3d5784ea96b30330da88b2b65e9e45a44f /src/quickcontrols2
parent935daea1cdd9247d04618fcd67eb2a935060d1db (diff)
Doc: fallback style
Change-Id: I03996d592de4b7db29b671fa73ab44036a80fa2f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quickcontrols2')
-rw-r--r--src/quickcontrols2/qquickstyle.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/quickcontrols2/qquickstyle.cpp b/src/quickcontrols2/qquickstyle.cpp
index 80a7abef..f4fc1764 100644
--- a/src/quickcontrols2/qquickstyle.cpp
+++ b/src/quickcontrols2/qquickstyle.cpp
@@ -80,6 +80,19 @@ QT_BEGIN_NAMESPACE
Qt Quick Controls 2. It is not possible to change the style after the QML
types have been registered.
+ The style can also be specified as a path to a custom style, such as
+ \c ":/mystyle". See \l {Creating a Custom Style} for more details about
+ building custom styles. Custom styles do not need to implement all controls.
+ By default, the styling system uses the \l {Default style} as a fallback
+ for controls that a custom style does not provide. It is possible to
+ specify a different fallback style to customize or extend one of the
+ built-in styles.
+
+ \code
+ QQuickStyle::setStyle(":/mystyle");
+ QQuickStyle::setFallbackStyle("Material");
+ \endcode
+
\sa {Styling Qt Quick Controls 2}
*/
@@ -273,13 +286,16 @@ void QQuickStyle::setStyle(const QString &style)
}
/*!
- \since 5.9
+ \since 5.8
Sets the application fallback style to \a style.
\note The fallback style must be the name of one of the built-in Qt Quick Controls 2 styles, e.g. "Material".
\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.
+
+ 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}.
*/
void QQuickStyle::setFallbackStyle(const QString &style)
{