[Interest] windeployqt and embedeed QML (.qrc)

Damien Courtois damien.courtois at gmail.com
Mon Apr 4 15:57:45 CEST 2016


Hi,

Thanks, but as I said, my qml files are compiled into the executable (via a
.qrc file) so the --qmldir option won't help.
But I found out that it's not supported. I can't find the link of the page
back (it's really well hidden ...) but windeployqt uses another small tool
to find qml dependencies, and this tool can't scan for imports into
executable files.
So I solved my problem by just adding an "imports.qml" file with this
content :

import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
import QtQml.Models 2.2
import Qt.labs.settings 1.0
import QtMultimedia 5.6

Component {}

So that the tool can correctly find the imports.

Regards,
Damien

2016-04-04 15:40 GMT+02:00 Benjamin TERRIER <b.terrier at gmail.com>:

> Hi Damien,
>
> Have a look at the "--qmldir <directory>" option ("windeployqt --help"
> to display all available options). The given directory will be scanned
> for QML dependencies.
>
> BR,
>
> Benjamin
>
> 2016-04-02 20:59 GMT+02:00 Damien Courtois <damien.courtois at gmail.com>:
> > Hi there,
> >
> > I have a lot of trouble finding informations about this, but if I missed
> the
> > obvious one, in advance sorry for that.
> > My problem is that I have a Qml application, but all the Qml files are
> > embedded in the executable through a .qrc file.
> > And when I use windeployqt, it doesn't seem to copy any Qml module /
> file,
> > as though the tool was not able to get the imports from my embedded Qmls.
> >
> > Is this supported by the tool ? Or will I need to provide the Qml files
> next
> > to my executable so that the tool can do its job ?
> >
> > By the way I'm using Qt 5.6.
> >
> > Thanks in advance for any help.
> > Damien Courtois
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160404/e8f04ed9/attachment.html>


More information about the Interest mailing list