[Interest] modules QtQml.Models

Joey DiGiorgio digiorgiojoey at gmail.com
Fri Nov 8 17:22:15 CET 2019


Hi Furkan,

I set the variable you mentioned and re-ran the app. I see the following.

```
addLibraryImport: "QtQuick.Window" 2.0 as ""
ImportExtension: loaded ":/qt-project.org/imports/QtQuick/Windows.2/qmldir"
addLibraryImport: "QtQml.Models" 2.3 as ""
addLibraryImport: "QtQuick.Layouts" 1.3 as ""
ImportExtension: loaded ":/qt-project.org/imports/QtQuick/Layouts/qmldir"
```

So I'm not seeing the "qmldir" file for Models.2 being found. I didn't have
to manually find the others, but is there some way I can manually find the
one for QtQml.Models?

- Joey D.

On Thu, Nov 7, 2019, 9:55 AM Furkan Üzümcü <furkanuzumcu at gmail.com> wrote:

> There’s an environment variable called `QML_IMPORT_TRACE`. That might give
> you some more clues.
>
> Regards,
> Furkan Üzümcü
>
> ------------------------------
> *From:* Interest <interest-bounces at qt-project.org> on behalf of Joey
> DiGiorgio <digiorgiojoey at gmail.com>
> *Sent:* Wednesday, November 6, 2019 22:24
> *To:* interest at qt-project.org
> *Subject:* [Interest] modules QtQml.Models
>
> Hi All,
>
> I just wanted to ask if anyone is having problems importing
> QtQml.Models in their QML files. I have the following code.
>
> ```
> import QtQuick 2.1
> import QtQuick.Controls 2.0
> import QtQuick.Window 2.0
> import QtQml.Models 2.3
>
> Item
> {
> DelegateModel
> {
> }
> Rectangle
> {
> anchors.fill: parent
> color: "#FF0000"
> }
> }
> ```
>
> At runtime I get "module 'QtQml.Models" is not installed".
>
> I am using Qt v5.10.1 for iOS. My liker flags look something similar
> to the following.
>
> ```
> ...
> -L${Qt5_ROOT}/lib \
> ...
> ...
> -L${Qt5_ROOT}/qml/QtQuick.2 \
> -L${Qt5_ROOT}/qml/QtQml/Models.2 \
> ...
> ...
> -lqtquick2plugin \
> -lmodelsplugin \
> ...
> ...
>
> ```
>
> I am also linked against all of the modules/components listed in
> <qt-installation>/qml/QtQml/Models.2/libmodelsplugin.prl
>
> Everything builds and compiles, but at runtime, the QML engine can't
> seem to find the Models.2 module.
>
> Any ideas what might be happening? Do I need to set some type of
> import path or link in some additional modules?
>
> - Joey D.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191108/c1ac2775/attachment.html>


More information about the Interest mailing list