From bfc8244f720297c73e7cb588d26ffb58cb6e23b3 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Wed, 2 Jul 2014 09:08:22 +0200 Subject: Doc: Add documentation for the deployment of the Controls Document the fact that Qt Quick Controls javascript and qml files are embedded in resources. This is useful while deploying the controls while it has some limitations. Change-Id: Ie6cf34e644fc4542742080d38643015a3d3fe0bd Reviewed-by: Jerome Pasion Reviewed-by: J-P Nurmi --- src/controls/doc/qtquickcontrols.qdocconf | 2 +- src/controls/doc/src/qtquickcontrols-overview.qdoc | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index 2b456ff9..53863e31 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -29,7 +29,7 @@ qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.title = Qt Quick Cont qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.indexTitle = Qt Quick Controls Styles Structure qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.type = manual -depends = qtqml qtquick qtgui qtwidgets qtdoc qtquicklayouts +depends = qtqml qtquick qtgui qtwidgets qtdoc qtquicklayouts qtcore # Specify the install path under QT_INSTALL_EXAMPLES # Examples will be installed under quick/controls - 'controls' subdirectory diff --git a/src/controls/doc/src/qtquickcontrols-overview.qdoc b/src/controls/doc/src/qtquickcontrols-overview.qdoc index dc424673..09f5318d 100644 --- a/src/controls/doc/src/qtquickcontrols-overview.qdoc +++ b/src/controls/doc/src/qtquickcontrols-overview.qdoc @@ -99,6 +99,30 @@ to the context of the current QML engine. See QQmlContext for more information. + \section2 Deploying Qt Quick Controls + + Since Qt 5.2, the Qt Quick Controls JavaScript and QML files are embedded into the plugin + using \l{The Qt Resource System}{Qt resources} (.qrc) for the QtQuick.Controls and QtQuick.Controls.Styles imports. It is only + necessary to deploy the qtquickcontrolsplugin C++ library and its qmldir file found in the plugin directory + \e{qml/QtQuick/Controls}. + + The .js/.qml files are still placed into the plugin directory though for keeping the development + tasks convenient, debugging and autocompletion capabilities remain unchanged. For deployment, + these files can be ignored. In practice, the \e{Styles} and \e{Private} subfolders can be deleted as + well as all .js and .qml files present under \e{qml/QtQuick/Controls}. + + \note On Windows, the \l{Qt for Windows - Deployment#The Windows Deployment Tool}{Windows Deployment Tool} + only deploys the Qt Quick Controls plugin and its qmldir file. + + Using resources facilitates the deployment of the Qt Quick Controls though it has limitations + that still need to be addressed. + + \note On iOS, the qmlimportscanner tool is used to parse the required qml imports so they can + be deployed accordingly. The files embedded in resources are not scanned by this tool though + and when linking statically, some required imports used by the Qt Quick Controls can be + forgotten. This is a known limitation and a workaround is to add potentially missing imports in + one of the qml files of the application using the controls. + \section1 Related information \list -- cgit v1.2.1