Import QtQml.Models 2.1 issue
-
jsprenkle: Thanks for the note. It is a copy-paste mistake here that the import statements are on the same line. In the original code, there are not. Thanks anyway! :)
Jawad: I tried to look for some info wrt .pro file but without success. Let me know if you find something on your side.
-
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
" -
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?