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. "import QtQuick.Controls 1.0" - QML Module not found (Design Time only - intellisense)
Forum Updated to NodeBB v4.3 + New Features

"import QtQuick.Controls 1.0" - QML Module not found (Design Time only - intellisense)

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.7k 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.
  • N Offline
    N Offline
    Nosf
    wrote on last edited by
    #1

    Platform: Windows(VS2012) and OSX
    Built from: Qt Installer
    Version: 5.1

    Now if I create a new QML project from QtCreator, everything works fine(intellisense wise).

    However if I generate the project via importing CMakeLists.txt (CMake generator) file, the application runs and functions fine however while editing the qml file there is no intellisense support for most of the file.

    !http://i.imgur.com/Y67QqTc.png(Image)!

    Pls note the application itself compiles and run's fine. It's just the design time complains about not finding the module and thus the Design tab is completely un-usable making it quite annoying to work with.

    Finally it also seems to pick up the QtQuick 2.1 line fine, it's just the other one's it's complaining about. Not really sure where or how to try adding this "QML_IMPORT_PATH" vis CMake since it seems to a design time only problem and build/run-time seems to locate all requirements correctly

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      CMake support is AFAIK experimental. Maybe it's a good idea to report this in Qt "bugtracker":http://bugreports.qt-project.org/ (but first search if it's not already reported).

      (Z(:^

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Nosf
        wrote on last edited by
        #3

        Yeh that was kinda what I'd thought. Currently my workaround for this to get CMake generate a .pro file.

        As long as I had the .pro file with contents such as:

        @ set(QtPROHelper ${CMAKE_BINARY_DIR}/something.pro)
        file(WRITE ${QtPROHelper} "#This File is Auto-Generated. Do Not Edit Manually.")
        file(APPEND ${QtPROHelper} "\nQT += qml quick widgets")
        file(APPEND ${QtPROHelper} "\nTARGET = something")
        file(APPEND ${QtPROHelper} "\n\nRESOURCES += $$quote(${CMAKE_SRC_DIR}/resources.qrc)")
        file(APPEND ${QtPROHelper} "\n\nOTHER_FILES += ")
        foreach(VIEW_FILE ${VIEW_FILES})
        file(APPEND ${QtPROHelper} "$$quote(${VIEW_FILE}) ")
        endforeach()@

        With just that I can open the project via the .pro when I need to work on the QML side of things and intellisense works fine. When I need to actually build the project/ work on the c++ side I just flip back to VisualStudio.

        You could ofc go all out and add the LIBS and INCLUDEDIR and such to get the .pro to compile as well but it wasn't needed.

        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