Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. DelegateModel - Unknown component. (M300)

DelegateModel - Unknown component. (M300)

Scheduled Pinned Locked Moved QML and Qt Quick
delegatemodelqtqml
3 Posts 2 Posters 3.9k Views
  • 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.
  • J Offline
    J Offline
    Jan-Willem
    wrote on last edited by Jan-Willem
    #1

    Hi there.

    Last week I have experimented with C++ and qml. Now I am working on something that needs a DelegateModel. Although the project compiles without any problem and the project seems to be running as expected, in the code editor of QtCreator DelegateModel is not recognized. In my .pro file I have added QT += qml quick and my .qml file starts with:

    import QtQuick 2.0
    import QtQml.Models 2.1
    import QtQuick.Controls 1.2
    

    For some reason auto completion does not work when I add import QtQml.Models 2.1. So I presume the code editor does not recognize the QtQml module.

    Anyone any ideas how to fix this?
    I am using Qt5.4.1 with QtCreator 3.4.0 on Debian.

    J 1 Reply Last reply
    0
    • J Jan-Willem

      Hi there.

      Last week I have experimented with C++ and qml. Now I am working on something that needs a DelegateModel. Although the project compiles without any problem and the project seems to be running as expected, in the code editor of QtCreator DelegateModel is not recognized. In my .pro file I have added QT += qml quick and my .qml file starts with:

      import QtQuick 2.0
      import QtQml.Models 2.1
      import QtQuick.Controls 1.2
      

      For some reason auto completion does not work when I add import QtQml.Models 2.1. So I presume the code editor does not recognize the QtQml module.

      Anyone any ideas how to fix this?
      I am using Qt5.4.1 with QtCreator 3.4.0 on Debian.

      J Offline
      J Offline
      Jan-Willem
      wrote on last edited by
      #2

      UPDATE!

      A workaround for the example I am trying to build is to use VisualDataModel.
      But the question of course remains, why doesn't the code editor in QtCreator recognize the QtQml module?

      p3c0P 1 Reply Last reply
      0
      • J Jan-Willem

        UPDATE!

        A workaround for the example I am trying to build is to use VisualDataModel.
        But the question of course remains, why doesn't the code editor in QtCreator recognize the QtQml module?

        p3c0P Offline
        p3c0P Offline
        p3c0
        Moderators
        wrote on last edited by
        #3

        Hi @Jan-Willem,
        Well it seems to be like a known bug. See QTCREATORBUG-13509.

        157

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved