Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator 10.0.1 doesn't read QML module type informations anymore
Forum Updated to NodeBB v4.3 + New Features

Qt Creator 10.0.1 doesn't read QML module type informations anymore

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 642 Views 1 Watching
  • 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.
  • F Offline
    F Offline
    fama_lab3d
    wrote on last edited by
    #1
    Qt Creator 10.0.1
    Based on Qt 6.4.3 (MSVC 2019, x86_64)
    
    Built on May 4 2023 01:13:52
    
    From revision d2b3c31e04
    

    Hello,
    after upgrading to Qt 6.5 and Qt Creator 10.0.1, I can no longer use the IntelliSense for my C++ classes inside QML.

    For instance, if I have a simple class with QML_NAMED_ELEMENT, and I instantiate inside a QML file, no autocompletion occurs regarding this class.

    In particular, I get a permanent warning on every import <module> I do when importing my custom module, Qt's ones are fine.

    The warning is:

    QML module contains C++ plugins, currently reading type informations...
    

    My CMake setup to make it work is the following:

    # QML_IMPORT_PATH
    # Used by Qt Creator for IntelliSense (clangd/clazy)
    
    # Env variable that points to C:/Qt/6.5.0/msvc2019_64/qml
    if(DEFINED $ENV{QML_IMPORT_PATH})
        list(APPEND QML_DIRS "$ENV{QML_IMPORT_PATH}")
    endif()
    list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}")
    list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}/SinteringCompanion")
    list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}/SinteringCompanion/qml")
    list(REMOVE_DUPLICATES QML_DIRS)
    set(QML_IMPORT_PATH ${QML_DIRS} CACHE STRING "")
    
    F 1 Reply Last reply
    0
    • F fama_lab3d
      Qt Creator 10.0.1
      Based on Qt 6.4.3 (MSVC 2019, x86_64)
      
      Built on May 4 2023 01:13:52
      
      From revision d2b3c31e04
      

      Hello,
      after upgrading to Qt 6.5 and Qt Creator 10.0.1, I can no longer use the IntelliSense for my C++ classes inside QML.

      For instance, if I have a simple class with QML_NAMED_ELEMENT, and I instantiate inside a QML file, no autocompletion occurs regarding this class.

      In particular, I get a permanent warning on every import <module> I do when importing my custom module, Qt's ones are fine.

      The warning is:

      QML module contains C++ plugins, currently reading type informations...
      

      My CMake setup to make it work is the following:

      # QML_IMPORT_PATH
      # Used by Qt Creator for IntelliSense (clangd/clazy)
      
      # Env variable that points to C:/Qt/6.5.0/msvc2019_64/qml
      if(DEFINED $ENV{QML_IMPORT_PATH})
          list(APPEND QML_DIRS "$ENV{QML_IMPORT_PATH}")
      endif()
      list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}")
      list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}/SinteringCompanion")
      list(APPEND QML_DIRS "${PROJECT_BINARY_DIR}/SinteringCompanion/qml")
      list(REMOVE_DUPLICATES QML_DIRS)
      set(QML_IMPORT_PATH ${QML_DIRS} CACHE STRING "")
      
      F Offline
      F Offline
      fama_lab3d
      wrote on last edited by
      #2

      "Magically fixed" by rebooting the PC.
      I guess the good old "Have you tried rebooting your PC?" suggestion still holds true.

      A 1 Reply Last reply
      0
      • F fama_lab3d has marked this topic as solved on
      • F fama_lab3d

        "Magically fixed" by rebooting the PC.
        I guess the good old "Have you tried rebooting your PC?" suggestion still holds true.

        A Offline
        A Offline
        Anatoliy Tomilov
        wrote on last edited by
        #3

        Adding exact version number can help (example). Other changes from commit may also be helpful. Like adding URI of qt6_add_qml_module as a last part of path to the plugin (and library) of a module and setting QML_IMPORT_PATH to its base directory path.
        Performing Tools -> QML/JS -> Reset Code Model will may also be helpful.

        1 Reply Last reply
        1

        • Login

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