Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-11149

Auto-generated CMake project structure is not understood by Qt Creator's code model

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1. In Qt Design Studio, create a new project
      2. Load the top-level CMakeLists.txt in Qt Creator
      3. Open content/App.qml in the code editor

      (As an alternative to Steps #1 and #2, you could also create a new "Qt Quick Application" in Qt Creator and enable "Creates a project that you can open in Qt Design Studio")

       

      Outcomes
      Qt Creator says, "QML module not found"

       

      Workaround
      In the top-level CMakeLists.txt, add the following:

      set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml)
      set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY}
          CACHE STRING "Import paths for Qt Creator's code model"
          FORCE
      )
      

       

      Notes

      Attachments

        Issue Links

          For Gerrit Dashboard: QDS-11149
          # Subject Branch Project Status CR V

          Activity

            People

              knud Knud Dollereder
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes