aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc')
-rw-r--r--src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc b/src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc
new file mode 100644
index 0000000000..c4485c81f1
--- /dev/null
+++ b/src/quickcontrols/doc/src/qtquickcontrols-deployment.qdoc
@@ -0,0 +1,73 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \page qtquickcontrols-deployment.html
+ \title Deploying Qt Quick Controls Applications
+
+ Deployment of Qt Quick Controls applications is very similar to
+ deployment of other types of Qt applications. However, there are a few
+ factors to consider.
+
+ \section1 Deploying an Application with Several Styles
+
+ Suppose you have an application that will be deployed to both Android and
+ Windows devices. To ensure that only the minimum set of files that are
+ necessary for the application to run are deployed to each device, you can
+ use file selectors. For example, your directory structure could look like
+ this:
+
+ \code
+ resources.qrc
+ main.qml
+ +windows/MyPage.qml
+ +windows/qtquickcontrols2.conf
+ +android/MyPage.qml
+ +android/qtquickcontrols2.conf
+ \endcode
+
+ In the project above, \c main.qml would import \c QtQuick.Controls, for
+ example, but shouldn't import, say, \c QtQuick.Controls.Material. Any code
+ that is style-specific is moved out into separate files; just as we've done
+ for \c MyPage.qml.
+
+ The \c +windows/qtquickcontrols2.conf file would contain configuration
+ options specific to the Universal style:
+
+ \code
+ [Controls]
+ Style=Universal
+
+ [Universal]
+ Theme=Dark
+ Accent=Red
+ \endcode
+
+ The \c +android/qtquickcontrols2.conf file would contain configuration
+ options specific to the Material style:
+
+ \code
+ [Controls]
+ Style=Material
+
+ [Material]
+ Theme=Light
+ Accent=Brown
+ \endcode
+
+ \section1 Static Builds
+
+ For dynamically built applications, it is not necessary to import a
+ specific style that should be usable by that application. For statically
+ built applications, Qt's build system must be involved to ensure that
+ QML plugins function as expected. Specifically, \c qmake uses
+ \c qmlimportscanner to scan the QML files in your application for import
+ statements. For this reason, any styles that should be usable by a
+ statically built application must explicitly import that style. Where the
+ import occurs is up to the developer, but it is recommended to follow the
+ approach mentioned in the \l {Deploying an Application with Several Styles}
+ section, so that only the minimum set of files that are necessary for a
+ particular device are deployed.
+
+ \sa {Deploying Qt Applications}, {Using Styles in Qt Quick Controls}
+*/