PDA

View Full Version : Compile QML of Plugins



RapidMark
6th November 2019, 16:38
Is there a way to compile the QML included with plugins (like QtWebEngine, QtQuick.2, etc).

Overall I am including all of my QML pre-compiled (and in a resource), and the loading speed has been greatly improved.

However loading a WebPage (initially) is slow (I'm thinking having to compile QML is not helping)... so I'd like to pre-compile the QML that comes with any plugin.

When running windeployqt.exe (there is no command to have it compile it when it deploys, unfortunately), but is there a way to compile it?

- RapidMark

RapidMark
14th November 2019, 23:09
Is there a way to compile the QML included with plugins (like QtWebEngine, QtQuick.2, etc).

Overall I am including all of my QML pre-compiled (and in a resource), and the loading speed has been greatly improved.

However loading a WebPage (initially) is slow (I'm thinking having to compile QML is not helping)... so I'd like to pre-compile the QML that comes with any plugin.

When running windeployqt.exe (there is no command to have it compile it when it deploys, unfortunately), but is there a way to compile it?

- RapidMark

Added this to a deploy script and now I ship with qmlc (and remove the qml).


echo Compiling QML
cd qml
for /r %%i in (*.qml) do (echo|set /p="." & qmlcachegen %%i)
echo .
echo Deleting QML
for /r %%i in (*.qml) do (echo|set /p="." & del %%i)
echo .
cd ..