Hello. I've always used Qt Creator and was mostly happy with it, but with the recent advent of AI tools in Visual Studio Code (specifically, Cursor IDE that is a fork of VSCode), I decided to give it a try. So, here's the problem: I installed all the latest addons from Qt Company related to Qt, in my CMake project I've added -DQT_QML_GENERATE_QMLLS_INI=ON to enable .qmlls.ini files generation. File in the root folder of my project is actually being generated:
[General]
buildDir=D:/Code/MyProject/build
no-cmake-calls=false
docDir=C:/Dev/Qt6.8.1/Docs/Qt-6.8.1
importPaths=
[General]
buildDir=D:/Code/MyProject/build
no-cmake-calls=false
docDir=C:/Dev/Qt6.8.1/Docs/Qt-6.8.1
importPaths=
To copy to clipboard, switch view to plain text mode
I've restarted IDE and QML language server, but any QML files I open don't recognize any QML modules. So, even the first line like
import QtQuick
import QtQuick
To copy to clipboard, switch view to plain text mode
gives
Warnings occurred while importing module "QtQuick":
Failed to import QtQuick. Are your import paths set up properly? Did you set the "QT_QML_GENERATE_QMLLS_INI" CMake variable on your project to "ON"? qmllint
Warnings occurred while importing module "QtQuick":
Failed to import QtQuick. Are your import paths set up properly? Did you set the "QT_QML_GENERATE_QMLLS_INI" CMake variable on your project to "ON"? qmllint
To copy to clipboard, switch view to plain text mode
Output from QML Language Server in VSCode is not useful either. All it says:
[Warn - 4:16:35 PM] Registration of file updates failed, will miss file changes from outside the editor.-32603 Request client/registerCapability failed with message: No feature implementation for workspace.didChangeWatchedFiles found. Registration failed.
[Warn - 4:16:35 PM] Registration of file updates failed, will miss file changes from outside the editor.-32603 Request client/registerCapability failed with message: No feature implementation for workspace.didChangeWatchedFiles found. Registration failed.
To copy to clipboard, switch view to plain text mode
Does anyone have any experience with using QML in VSCode? I couldn't find any decent docs since this tech is relatively new. I'm on Windows. I use Qt 6.8.2 with QML Language Server component installed
Bookmarks