工程包含4个文件,使用CMake管理,最基础的qml工程,包含一个标签和一个按钮。 工程代码如下,创建4个文件后,用Qt Creator打开CMakeLists.txt: CMakeLists.txt cmake_minimum_required(VERSION 3.16) add_compile