Commit 35cc7e70 authored by Alexandru Croitor's avatar Alexandru Croitor
Browse files

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: default avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
Showing with 18 additions and 0 deletions
...@@ -141,4 +141,18 @@ ...@@ -141,4 +141,18 @@
directory specified by directory specified by
QLibraryInfo::location(QLibraryInfo::TranslationsPath) QLibraryInfo::location(QLibraryInfo::TranslationsPath)
\endlist \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
*/ */
...@@ -205,6 +205,10 @@ ...@@ -205,6 +205,10 @@
window.alert("Page is from qt.io, but not wiki.qt.io"); window.alert("Page is from qt.io, but not wiki.qt.io");
\endcode \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 \section1 Managing Certificates
Qt WebEngine uses its own network stack, and therefore QSslConfiguration is not used to Qt WebEngine uses its own network stack, and therefore QSslConfiguration is not used to
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment