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. VSCode: In a multi-root workspace, Qt Qml extension fails to resolve the "workspaceFolder" setting correctly

VSCode: In a multi-root workspace, Qt Qml extension fails to resolve the "workspaceFolder" setting correctly

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 3 Posters 71 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.
  • A Offline
    A Offline
    AnttiK
    wrote last edited by
    #1

    Hi all,

    I have a VS Code multi-root workspace project located in https://github.com/anttikes/usb-fm-radio/. When I open the workspace file in the root, go to "GUI" and open "Main.qml" I get an error from the qmllint tool that the "GUI" module could not be found.

    f96fffc9-5ff8-4bb5-a8c7-928528d19bb8-image.png

    The reason seems clear: a missing import path. I then modify ".vscode/settings.json", and add the string array setting "qt-qml.qmlls.additionalImportPaths" to look like this:

    "qt-qml.qmlls.additionalImportPaths": [
        "${workspaceFolder}/build/GUI/components"
    ]
    

    This causes a rather perplexing behavior. In Main.qml the import path error stays and a new directory entry appears into the list, but the path looks wrong:
    002ae356-cc26-48c9-a462-79d2208d2078-image.png

    For some reason, the extension or the linter has reviewed the workspace file and taken the first entry in the "folders" sub-key. This behavior is obviously wrong because we are in the "GUI" portion of the multi-root workspace.

    Here is an excerpt of the "qt-qml" output in VS Code, with my username redacted from the output:

    2026-02-11 22:23:14.888 [info] [qmlls] Stopping QML Language Server: "Firmware"
    2026-02-11 22:23:14.888 [info] [qmlls] Stopping QML Language Server: "GUI"
    2026-02-11 22:23:14.889 [info] [qmlls] QML Language Server stopped: "GUI"
    2026-02-11 22:23:14.890 [info] [qmlls] QML Language Server stopped: "Firmware"
    2026-02-11 22:23:14.891 [info] [qmlls] Starting QML Language Server with:-be:/USB FM Radio/Code/usb-fm-radio/GUI/build;-dC:/Qt/Docs/Qt-6.10.2;-Ie:\USB FM Radio\Code\usb-fm-radio\Firmware/build/GUI/components;-IC:\Qt\6.10.2\msvc2022_64\qml
    2026-02-11 22:23:14.892 [info] [qmlls] Starting QML Language Server with:-bE:/USB FM Radio/Code/usb-fm-radio/Firmware/build
    2026-02-11 22:23:14.956 [info] [qmlls] QML Language Server started for Firmware C:\Users\-----\AppData\Local\qmlls\files\qmlls.exe
    2026-02-11 22:23:14.958 [info] [qmlls] QML Language Server started for GUI C:\Users\-----\AppData\Local\qmlls\files\qmlls.exe
    2026-02-11 22:41:51.537 [info] [qmlls] Stopping QML Language Server: "GUI"
    2026-02-11 22:41:51.560 [info] [qmlls] QML Language Server stopped: "GUI"
    2026-02-11 22:41:51.562 [info] [qmlls] Starting QML Language Server with:-be:/USB FM Radio/Code/usb-fm-radio/GUI/build;-dC:/Qt/Docs/Qt-6.10.2;-IC:\Qt\6.10.2\msvc2022_64\qml
    2026-02-11 22:41:51.626 [info] [qmlls] QML Language Server started for GUI C:\Users\-----\AppData\Local\qmlls\files\qmlls.exe
    
    
    1 Reply Last reply
    0
    • aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi @AnttiK,

      this is a user forum. Bugs should be reported to bugreports.qt.io

      Thanks and regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        AnttiK
        wrote last edited by
        #3

        Thanks. Can I somehow login to this different site with the same account I have here? It doesn't seem to accept my current credentials...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          Hi,

          See this post for information about the bug tracker.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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