Qt Quick/DS wizard: Fix the QML import path

The wizard builds custom components to a "qml" subdirectory, which the
QML engine is told about in main.cpp, but we need to tell the code model
too, with a QML_IMPORT_PATH cache variable.

Without this, the QML editor shows errors for the module imports.

Change-Id: Ie48e809e2d51cc796c6c6c186a81c67e23a3609b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2023-11-20 13:59:15 +01:00
parent d81d41032a
commit e33c15c75d

View File

@@ -44,3 +44,7 @@ install(TARGETS %{ProjectName}App
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# make IDEs aware of the QML import path
set(QML_IMPORT_PATH ${PROJECT_BINARY_DIR}/qml CACHE PATH
"Path to the custom QML components defined by the project")