1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5 \page qtquickcontrols-deployment.html
6 \title Deploying Qt Quick Controls Applications
8 Deployment of Qt Quick Controls applications is very similar to
9 deployment of other types of Qt applications. However, there are a few
12 \section1 Deploying an Application with Several Styles
14 Suppose you have an application that will be deployed to both Android and
15 Windows devices. To ensure that only the minimum set of files that are
16 necessary for the application to run are deployed to each device, you can
17 use file selectors. For example, your directory structure could look like
24 +windows/qtquickcontrols2.conf
26 +android/qtquickcontrols2.conf
29 In the project above, \c main.qml would import \c QtQuick.Controls, for
30 example, but shouldn't import, say, \c QtQuick.Controls.Material. Any code
31 that is style-specific is moved out into separate files; just as we've done
34 The \c +windows/qtquickcontrols2.conf file would contain configuration
35 options specific to the Universal style:
46 The \c +android/qtquickcontrols2.conf file would contain configuration
47 options specific to the Material style:
58 \section1 Static Builds
60 For dynamically built applications, it is not necessary to import a
61 specific style that should be usable by that application. For statically
62 built applications, Qt's build system must be involved to ensure that
63 QML plugins function as expected. Specifically, \c qmake uses
64 \c qmlimportscanner to scan the QML files in your application for import
65 statements. For this reason, any styles that should be usable by a
66 statically built application must explicitly import that style. Where the
67 import occurs is up to the developer, but it is recommended to follow the
68 approach mentioned in the \l {Deploying an Application with Several Styles}
69 section, so that only the minimum set of files that are necessary for a
70 particular device are deployed.
72 \sa {Deploying Qt Applications}, {Using Styles in Qt Quick Controls}