Import QtQml.Models 2.1 issue
-
try looking where you installed your Qt to see if the structure Qt uses to find plugins is present. Here's the directory structure on my box:
Directory:
YOURQTINSTALLPATH\qml\QtQml\Models.2There should be a file named "qmldir" there and some dll files.
My qmldir file contains the text:
module QtQml.Models
plugin modelsplugin -
jsprenkle: I looked into my Qt install path, i.e. "C:\Qt\5.2.1", and each project type folder, e.g. "mingw48_32" and "msvc2010" (I tried multiple project type thinking it might be the cause of the issue), and I do find the structure "qml\QtQml\Models.2" containing the file "qmldir". Each instance of this file contains the lines:
"
module QtQml.Models
plugin modelsplugin
classname QtQmlModelsPlugin
" -
Did you try setting the version number down? Perhaps you don't have version 2.1 but do have version 2.0?
@import QtQml.Models 2.0@
-
I initially tried that and failed. Based on the information I found, QtQml.Models started at version 2.1 anyway...
-
I am using Linux but I have the same issue. I found a hint that I shall install
@qtdeclarative5-models-plugin@but it wasn't found when I tried.
I am looking at StocQt example on Sailfish SDK. The example imports 2.1
-
I got it working in Linux. If I deploy it as RPM package, it resolves the package dependencies itself.
-
And after reading readme, I found out that installing qt5-qtdeclarative-import-models2 is the missing package.
@pkcon install qt5-qtdeclarative-import-models2@
-
Thanks everyone for the replies. Turns out it's something wrong with Qt Creator and/or its environment. I've switched everything to Visual Studio 2010 and now everything works perfectly.
-
Hi,
i cant install that in ubuntu...
my error..
Command failed: This tool could not find any available package: Package name qt5.3-qtdeclarative-import-models2 could not be resolved. -
Hi,
i cant install that in ubuntu...
my error..
Command failed: This tool could not find any available package: Package name qt5.3-qtdeclarative-import-models2 could not be resolved. -
Try to launch as rpm-package, not as binary.
-
Try to launch as rpm-package, not as binary.
-
I'm using QtCreator 3.4.1 and still have this issue.
@jalomann said:
And after reading readme, I found out that installing qt5-qtdeclarative-import-models2 is the missing package.
@pkcon install qt5-qtdeclarative-import-models2@
@jalomann how do I get and install this "qt5-qtdeclarative-import-models2"? I'm using Windows btw. Can you give me the link to the readme file?