Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    [Solved] ObjectModel is not a type

    QML and Qt Quick
    3
    5
    2150
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      ottoshmidt1 last edited by

      I get an error

      "ObjectModel is not a type "

      although,

      import QtQuick 2.0
      import QtQml 2.0

      are there.

      1 Reply Last reply Reply Quote 0
      • O
        onek24 last edited by

        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-access

        To help you i would appreciate a little bit more code or information on what you are trying to do.

        1 Reply Last reply Reply Quote 0
        • O
          ottoshmidt1 last edited by

          Thanks, I guess it was just given as an example in docs.

          1 Reply Last reply Reply Quote 0
          • O
            onek24 last edited by

            You're welcome. Feel free to ask if you have got more questions.

            1 Reply Last reply Reply Quote 0
            • X
              xpcoffee last edited by

              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.html

              You 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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post