'xxxx.pro' is Qt Project, please note that check the 'Run in terminal'(Projects -> Run Settings).

'CMakeLists.txt' is CMake Project, You can use CMake to generate other projects. Note: You may need to copy the dynamic library to the project's runtime(bin) directory.