[Solved] ObjectModel is not a type
-
I get an error
"ObjectModel is not a type "
although,
import QtQuick 2.0
import QtQml 2.0are there.
-
I don't think that you need QtQml 2.0 and there is no ObjectModel in qml expect it's your own component.
For further informations about all available modeltypes read:
"Model Types":http://qt-project.org/doc/qt-5.0/qtquick/qtquick-qmltypereference.html#model-view-types-and-data-storage-and-accessTo help you i would appreciate a little bit more code or information on what you are trying to do.
-
Thanks, I guess it was just given as an example in docs.
-
I had the same problem.
ObjectModel is a type used by the official Qt5 getting started tutorial.
The tutorial: "tut-link":http://qt-project.org/doc/qt-5/gettingstartedqml.html
ObjectModel documentation: "doc-link":http://qt-project.org/doc/qt-5/qml-qtqml-models-objectmodel.htmlYou need to make sure that the qtqml models package is installed as shown here: "sol-link":http://askubuntu.com/questions/450948/module-qtqml-models-is-not-installed
That's what worked for me.