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