A total of 628 characters, expected to take 2 minutes to complete reading.
Reason

 This problem occurs because the dynamic library cannot be found, so use the command windeployqt to deploy the dynamic library.
Solution
A more complete approach is visible:https://www.mcso.top/computer/programming/clion-qt-program/
Method 1: Manually add

This is because there is no use of Qt's Dynamic Link Library . We find QT directory \QT version number \mingw_64\bin directory, for example in my this is QT\6.7.0\mingw_64\bin, enter and create here. cmd window , enter:
# 加载环境
qtenv2.bat
# 动态链接库
windeployqt 你的文件.exe
Then many other files are generated in the build directory, and then the run becomes:

Method 2: Modify CMakeLists.txt
 In CMakeLists.txt Add the following code, will 3DSystemHelper Modify the name of the executable generated for you:
add_custom_command(TARGET 3DSystemHelper POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E echo "Start deploy Qt..."
        COMMAND ${CMAKE_PREFIX_PATH}/bin/qtenv2.bat
        COMMAND windeployqt ${EXECUTABLE_OUTPUT_PATH}/3DSystemHelper.exe
        COMMAND ${CMAKE_COMMAND} -E echo "Deploy Qt completed!"
)
Then rebuild it:

The result is still the same, can run:

 
                         
                                    




 English
English				 简体中文
简体中文