diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-07 15:17:53 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-20 13:10:26 +0000 |
commit | 35cc7e709f6c93a20a453d697f0da76cd9f05e1f (patch) | |
tree | e21b8b63f6482d5dad6247bf6b09fbe7c3ff75ae /src/webengine/doc | |
parent | 6f0bf6bca2990ab45f4b673e4a3b720756a794b1 (diff) |
Add documentation about using Qt Quick Compiler with qrc .js files
Application developer need to make sure that they skip processing .js
files by the Qt Quick Compiler, if the files will be loaded inside
HTML pages.
Task-number: QTBUG-66155
Change-Id: I09a3c6fa1f31b60a09d30012c6e15ae872bac639
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/webengine/doc')
-rw-r--r-- | src/webengine/doc/src/qtwebengine-deploying.qdoc | 14 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/webengine/doc/src/qtwebengine-deploying.qdoc b/src/webengine/doc/src/qtwebengine-deploying.qdoc index 8530bc075..c9f0f3580 100644 --- a/src/webengine/doc/src/qtwebengine-deploying.qdoc +++ b/src/webengine/doc/src/qtwebengine-deploying.qdoc @@ -141,4 +141,18 @@ directory specified by QLibraryInfo::location(QLibraryInfo::TranslationsPath) \endlist + + \section2 JavaScript Files in Qt Resource Files + + If your WebEngine application is built using the Qt Quick Compiler, and the application ships + JavaScript files inside .qrc resources, and these files are supposed to be loaded from inside + HTML pages, make sure to specify the resource files in a \c QTQUICK_COMPILER_SKIPPED_RESOURCES + qmake variable inside your project. This prevents the Qt Quick Compiler from trying to generate + C++ code for the corresponding JavaScript code, as well as removing the original JavaScript code + from the Qt resources file, which would lead to broken HTML pages. For example: + + \code + QTQUICK_COMPILER_SKIPPED_RESOURCES += resources/my_resource.qrc + \endcode + */ diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 904e4a551..ccba74504 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -205,6 +205,10 @@ window.alert("Page is from qt.io, but not wiki.qt.io"); \endcode + If your WebEngine application is built using the Qt Quick Compiler, and the application ships + JavaScript files inside .qrc resources, consider reading the section + \l{JavaScript Files in Qt Resource Files}. + \section1 Managing Certificates Qt WebEngine uses its own network stack, and therefore QSslConfiguration is not used to |