当前位置:网站首页>Qt学习05 Qt Creator工程介绍
Qt学习05 Qt Creator工程介绍
2022-06-29 10:30:00 【一个小黑酱】
Qt学习05 Qt Creator工程介绍
Qt Creator工程管理
Qt Creator以工程项目的方式对源码进行管理
一个Qt Creator工程包含不同类型的文件:
.pro项目描述文件 (重要)
.pro.user用户配置描述文件 (不重要)
.h头文件
.cpp源文件
.ui界面描述文件
资源文件 (图片,音频,等)
.pro项目描述文件
.pro项目描述文件的基本构成
# - 注释起始符
QT - 模块声明
TARGET - 可执行文件名
TEMPLATE - 程序模板声明 (是生成动态库还是可执行文件)
SOURCE - 源码文件声明
HEADERS - 头文件声明
FORMS - 界面文见声明
RC_FILE - 资源文件声明
.pro项目描述文件中的高级变量
INCLUDEPATH - 头文件搜索路径
CONFIG - 设定项目的配置星系和编译选项
LIBS - 添加第三方库文件
DEFINES - 定义编译宏
CONFIG配置
CONFIG用于设定项目的配置信息和编译选项
CONFIG的常用选项
debug - 构建debug版本的可执行程序
release - 构建release版本的可执行程序
debug_and_release - 同时构建debug版和release版
warn_on - 尽可能多的输出警告信息
warn_off - 不输出警告信息
.pro文件的本质为Qt中的Makefile文件!
.pro文件的本质

项目文件
一般来说,项目文件中的描述都使用相对路径
而相对路径是相对于项目文件本身而言
Qt Creator将项目文件作为目标文件
注意:
1.Qt Creator在打开项目文件的同时会生成.pro.user文件
2…pro.user文件包含一些与Qt相关的配置信息
3.当需要在不同计算机之间移动项目时,建议删除.pro.user文件
工程中的概念
构建 (build)
对项目中的所有文件进行编译,最终生成可执行程序
Debug版
可以进行程序调试的构建版本
可执行程序中包含调试信息,运行效率不高
Release版
最终发布的应用程序构建本版
无调试信息,运行效率高
小结
- Qt Creator以工程项目的方式对源码进行管理
- 一个Qt Creator工程包含不同类型的文件
- .pro文件用于配置和组织整个项目的相关信息
- .pro文件时Qt中与平台无关的Makefile文件
t Creator以工程项目的方式对源码进行管理 - 一个Qt Creator工程包含不同类型的文件
- .pro文件用于配置和组织整个项目的相关信息
- .pro文件时Qt中与平台无关的Makefile文件
- Qt Creator提供了开发所必备的快捷高效的功能
边栏推荐
- XML外部实体注入漏洞(一)
- Bs-gx-017 online examination management system based on SSM
- 在日本的 IT 公司工作是怎样一番体验?
- Hit the industry directly! The first model selection tool in the industry was launched by the flying propeller
- Online text filter less than specified length tool
- 【每日3题(3)】重新格式化电话号码
- 涂鸦云开发 demo 登录
- (JS) filter out keys with value greater than 2 in the object
- The last 48 hours! The cloud XR theme competition invites you to bloom together. See you at the competition!
- (JS) imitate the indexof method to find the position of a character in the string
猜你喜欢

math_ Mathematical expression & deformation of equation equation & accumulation of combined operation skills / means

The use of Fibonacci sequence and bubble sort in C language

Cornerstone of efficient remote office: effective communication | community essay solicitation

【每日3题(3)】重新格式化电话号码

Necessary for cloud native development: the first common codeless development platform IVX editor

云原生开发必备:首个通用无代码开发平台 iVX 编辑器
![[various * * question series] what are OLTP and OLAP?](/img/3f/48b4108d14d40212f678971c1b62bb.png)
[various * * question series] what are OLTP and OLAP?

Exclusive interview with CTO: the company has deepened the product layout and accelerated the technological innovation of domestic EDA

what? It's amazing that you can read the whole comic book for free. You can't learn to be a money saver together

斐波那锲数列与冒泡排序法在C语言中的用法
随机推荐
LeetCode 535 TinyURL的加密与解密[map] HERODING的LeetCode之路
【每日3题(1)】判断国际象棋棋盘中一个格子的颜色
MATLAB basic Max to find the maximum value of one-dimensional or two-dimensional array +sleep (pause)
Modbustcp protocol WiFi wireless learning single channel infrared module (round shell version)
Shell quotation marks and escape are rarely noticed, but they are often used in writing scripts
Uber前安全主管面临欺诈指控 曾隐瞒数据泄露事件
Take another picture of cloud redis' improvement path
(JS) responsibility chain mode
巴比特 | 元宇宙每日必读:HTC 宣布推出首款元宇宙手机,售价约2700元人民币,都有哪些新玩法?...
Mysql获取表信息
Pipeline aggregations pipeline aggregations - parent-2
添加通知公告,给在线用户发送通知
Spark - Task 与 Partition 一一对应与参数详解
LVGL库入门教程 - 动画
Live broadcast by technical experts from China Kuwait Fangde: how to build a private cloud platform based on openstack and CEPH| Issue 27
Babbitt | yuancosmos daily must read: HTC announced the launch of the first yuancosmos mobile phone, which costs about 2700 yuan. What are the new ways to play
通过网上进行股票开户安全吗
crypto 1~5
在编写shell脚本时如何正确姿势地管理临时文件
Ikvm Net project progress