当前位置:网站首页>QT learning (II) -.Pro file explanation
QT learning (II) -.Pro file explanation
2022-07-27 09:52:00 【Wanqi Linxi】
One 、.pro Explanation of the contents of the document
.pro File is qmake Used to generate makefile Intermediate file of file .
New simple Qt engineering , Default generation .pro The contents of the document are as follows , See note for explanation :
# [QT+= ] grammar , Define the Qt modular
QT += core gui
# because Qt5 take widgets Module from gui The module is independent , So define Qt Major version greater than 4 Include widgets modular
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
# Compile macro , Use c++17 compile
CONFIG += c++17
# It's fine too CONFIG -=
# CONFIG -= debug Don't compile debug type
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# The path of the source file that needs to be compiled ( The relative path of the project root directory )
SOURCES += \
main.cpp \
widget.cpp
# The path of the header file that needs to be compiled ( The relative path of the project root directory )
HEADERS += \
widget.h
# It needs to be compiled ui File path ( The relative path of the project root directory )
FORMS += \
widget.ui
# I only know that the target executable file path is set , Unable to understand the specific grammar , If you know the message in the welcome comment area
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
In addition to some default fields of the project ,.pro There are other fields in the file :
# Name of the target executable , Do not specify the default project name
TARGET = exe_name
# The storage directory of the target executable , Do not specify default as realse Catalog
# Several symbols for specifying the directory :
# macro $$PWD Represents the current directory and ./ equivalent
# ../ On behalf of the previous Directory
DESTDIR = exe_dir
# Compile macro switch , Compile differently according to different macros
DEFINES += defines
# obj File directory , namely .o file
OBJECTS_DIR = obj_dir
# Resource file path , Including pictures 、 Audio etc. ( The relative path of the project root directory )
RESOURCES += res.rc
# Link library path ( The relative path of the project root directory )
DEPENDPATH += depend_dir
# Link library files ( The relative path of the project root directory )
LIBS += -Llib_name
# You can also write a link library file with a path directly
LIBS += -Llib_dir_name
# Reference library header file path ( The relative path of the project root directory )
INCLUDES += include_dir
# The type of template used in the project
TEMPLATE = app
TEMPLATE = lib
Two 、qmake Generate makefile The process
to be continue…
边栏推荐
- What happens if the MySQL disk is full? I really met you!
- 吃透Chisel语言.26.Chisel进阶之输入信号处理(二)——多数表决器滤波、函数抽象和异步复位
- Proposed relocation! 211 the new campus of China University of Petroleum (East China) is officially opened!
- 拜托!面试请不要再问我 Ribbon 的架构原理
- How to restore the original version after installing Hal Library
- 会议OA项目之会议排座功能&&会议送审的实现
- Interview JD T5, was pressed on the ground friction, who knows what I experienced?
- Go Basics - arrays and slices
- c'mon! Please don't ask me about ribbon's architecture principle during the interview
- MOS drive in motor controller
猜你喜欢

聊聊索引失效的10种场景,太坑了

Qt 学习(二) —— Qt Creator简单介绍

面试京东 T5,被按在地上摩擦,鬼知道我经历了什么?

GBase 8a MPP集群扩容实战

Why is redis so fast? Redis threading model and redis multithreading

如何在树莓派上安装cpolar内网穿透

会议OA项目之会议排座功能&&会议送审的实现

华为交换机双上行组网Smart-link配置指南

Understand chisel language. 26. Chisel advanced input signal processing (II) -- majority voter filtering, function abstraction and asynchronous reset

Easy to understand! Graphic go synergy principle and Practice
随机推荐
When I went to oppo for an interview, I got numb
Nccl collective communication --collective operations
WordPress prohibits login or registration of plug-ins with a specified user name [v1.0]
July training (day 06) - sliding window
Monitoring artifact: Prometheus easy to get started, really fragrant!
Eureka delayed registration of a pit
Provincial Emergency Management Department: Guangzhou can strive to promote the experience of emergency safety education for children
Expose a technology boss from a poor family
去 OPPO 面试,被问麻了
Google Earth engine app - maximum image synthesis analysis using S2 image
I haven't delivered books for a long time, and I feel uncomfortable all over
QT | about the problem that QT creator cannot open the project and compile it
LeetCode.814. 二叉树剪枝____DFS
LeetCode.565. 数组嵌套____暴力dfs->剪枝dfs->原地修改
Esp8266 Arduino programming example ADC
npm常用命令
7/26 思维+dp+后缀数组的学习
July training (day 11) - matrix
July training (day 20) - binary search tree
如何在树莓派上安装cpolar内网穿透