Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-13329

QML/JS editor doesn't recognize QtQml.Models

    XMLWordPrintable

Details

    • 802a305737b45896acd123ff2dfbb1a5cc28ddfe

    Description

      To reproduce, create a QtQuick application in Qt creator and add the following import statement:

      import QtQml.Models 2.1
      

      QtCreator underlines that in red and later also doesn't highlight things like DelegateModel (from that import). The code runs fine, so QtQml.Models must be there. On hovering over the import statement I get the following message in a tooltip:

      QML module not found
      
      Import paths:
      /home/ulf/qt5.4/qtbase/qml
      /home/ulf/qt5.4/qtbase/imports
      
      For qmake projects, use the QML_IMPORT_PATH variable to add import paths.
      For qmlproject projects, use the importPath property to add import paths.
      

      However, there is a folder named /home/ulf/dev/qt5.4/qtbase/qml/QtQml/Models.2/ where QtQml.Models evidently resides in. If I change to different kits with different versions of Qt the paths in the tooltip change, but the problem remains.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              ulherman Ulf Hermann
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes