Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
1.4.0, 1.5.1
-
None
-
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.26100 N/A Build 26100
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Description
Qt Qml Language Server does not recognize import of module registered via qmlRegisterSingletonInstance
There is a simple project that uses the qmlRegisterSingletonInstance() function to register its object.
However, when trying to view this module, the code editor (via the QML language server) indicates an error in this qml file (Main.qml), and the VS Code code editor also highlights the error at the point where this object is accessed.
At the same time, Qt Creator displays it without errors. In addition, running the executable file also does not display any errors, works correctly, and normally accesses the property of the registered object and displays it as text.
Attached are screenshots and an archive with the source code for playback. The Qt library itself is installed in c:/Qt6.8.2.