Qt中的.pro文件内容介绍与作用描述

这不是Qtcreator入门教学,这只是博主的学习记录,所以可能缺乏对受众的考虑,见谅。文章如有谬误,请留言,若确认有问题,必改正。多交流

文件内容介绍

为了方便直观,我就在文件中打注释来解释啦!!

#-------------------------------------------------
#
# Project created by QtCreator 2019-05-13T18:37:03
#
#-------------------------------------------------

QT       += core gui//表示要为项目编译准备core gui类库模块,core gui是Qt用于GUI设计的类库模块

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets//如果Qt版本高于4,就要加入widgets模块

TARGET = Dijkstra//目标文件名为Dijkstra,如果学过Makefile(如果没学过,那请立马去学),应该很容易理解
TEMPLATE = app//表示项目模板是app,即一般的应用程序

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
# DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

CONFIG += c++11//表明编译器要支持c++11

SOURCES += \
        main.cpp \
        widget.cpp//源文件的组织说明

HEADERS += \
        widget.h//头文件的组织说明

FORMS += \
        widget.ui//ui文件的组织说明


# Default rules for deployment.//下面的部分暂时没搞清楚
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

文件作用描述

这个文件是给Qtcreator的,Qtcreator拿到这个文件之后就会对里面的内容进行分析,然后做出相应的工程级环境配置(专属于这个工程的),同时将工程的文件组织架构可视化地呈现给开发者。

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值