CLion 2021.3 + QT 5.14.2 Configuration
Reference Links:
- QT Projects
- Qt. Copying file error while trying to run the project. How to fix a mistake and why is it happening?
Installation
Install CLion and QT before configuration. Download links can be found online, or download directly from their official websites.Configuration
2.1 Open CLion and create a project
2.2 After creating, click File->Setting->Build,Execution,Deployment->ToolChains configuration file. We need to replace the environment and C Compiler with MinGW that comes with QT. Configuration is as shown in the figure.

2.3 After completion, Debug needs to be configured. Click CMake under 2.2, configure Debug. Enter -DCMAKE_PREFIX_PATH=E:\Qt\5.14.2\mingw73_64\lib\cmake in CMakeOption. After clicking Apply, you will find that you can Debug in the upper right corner. At this time, we need to link CLion with QT Designer. We need to set ExternalTool. Click File->Setting->Tools->External Tools and add a QT configuration file.
This step refers to the blogger: Developing Qt with CLion: Qt5.9.1+CLion2020.3 Step 3. After adding, you can use QT for joint coding.
2.4 Issue Report. The version I use reports an error “Error copying file “, at this time you can check link 2. Removing one sentence from it will allow it to run successfully.

Based mainly on the official configuration file for CLion, but since it’s all in English, I recorded the steps for future convenience.




