Pl45m4,
So, I created a new version of my project named: qml6_4_20_customcomps in a folder: Qt6.6.3 Quick Projects on my Desktop.
It now has two errors, the first one is:
C:\Users\JohnTrites\Desktop\Qt6.6.3 Quick Projects\qml6_4_20_customcomps\build\Desktop_Qt_6_6_3_MinGW_64_bit-Debug_deps\ds-build\src\imports\components\QuickStudioComponentsplugin_init_autogen\mocs_compilation.cpp:3: error: opening dependency file _deps\ds-build\src\imports\components\CMakeFiles\QuickStudioComponentsplugin_init.dir\9d777f3e334334a54a3cc379beec2ab9\mocs_compilation.cpp.obj.d: No such file or directory
C:/Users/JohnTrites/Desktop/Qt6.6.3 Quick Projects/qml6_4_20_customcomps/build/Desktop_Qt_6_6_3_MinGW_64_bit-Debug/_deps/ds-build/src/imports/components/QuickStudioComponentsplugin_init_autogen/mocs_compilation.cpp:3:47: fatal error: opening dependency file _deps\ds-build\src\imports\components\CMakeFiles\QuickStudioComponentsplugin_init.dir\9d777f3e334334a54a3cc379beec2ab9\mocs_compilation.cpp.obj.d: No such file or directory
3 | enum some_compilers { need_more_than_nothing };
| ^
So, I think it's looking for the QuickStudioComponentsplugin_init_autogen in the mocs compilation and can't find it.
Is this plugin available in the Qt Maintenance Tool or is it a separate download to install from the Qt website?
Or is there something else I'm missing?
Btw, the demo Qt6.6.3 Quick examples run fine. An example of the calclatr example vs qml6_4_20_customcomps CMakeLists.txt files may provide more insight to the problem:
qml6_4_20_customcomps CMakeLists.txt file:
cmake_minimum_required(VERSION 3.21.1)
option(LINK_INSIGHT "Link Qt Insight Tracker library" ON)
option(BUILD_QDS_COMPONENTS "Build design studio components" ON)
project(qml6_4_20_customcompsApp LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick)
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3)
qt_standard_project_setup()
endif()
qt_add_executable(qml6_4_20_customcompsApp src/main.cpp)
qt_add_resources(qml6_4_20_customcompsApp "configuration"
PREFIX "/"
FILES
qtquickcontrols2.conf
)
target_link_libraries(qml6_4_20_customcompsApp PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
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
)
if (BUILD_QDS_COMPONENTS)
include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents)
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules)
if (LINK_INSIGHT)
include(${CMAKE_CURRENT_SOURCE_DIR}/insight)
endif ()
include(GNUInstallDirs)
install(TARGETS qml6_4_20_customcompsApp
BUNDLE DESTINATION .
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")
calclatr CMakeLists.txt file
cmake_minimum_required(VERSION 3.16)
project(calqlatr LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/demos/calqlatr")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2)
qt_add_executable(calqlatrexample WIN32 MACOSX_BUNDLE
main.cpp
)
target_link_libraries(calqlatrexample PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::QuickControls2
)
qt_add_qml_module(calqlatrexample
URI demos.calqlatr
VERSION 1.0
QML_FILES
"calqlatr.qml"
"content/Display.qml"
"content/NumberPad.qml"
"content/CalculatorButton.qml"
"content/calculator.js"
RESOURCES
"content/images/paper-edge-left.png"
"content/images/paper-edge-right.png"
"content/images/paper-grip.png"
RESOURCE_PREFIX /
)
if(ANDROID)
set_target_properties(calqlatrexample
PROPERTIES
QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android
QT_ANDROID_TARGET_SDK_VERSION "33")
endif()
if(IOS)
set(asset_catalog_path "ios/Assets.xcassets")
target_sources(calqlatrexample PRIVATE "${asset_catalog_path}")
set_source_files_properties(${asset_catalog_path} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_target_properties(calqlatrexample
PROPERTIES XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon)
endif()
install(TARGETS calqlatrexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
Any recommendations? Thank you, JT