diff --git a/supermarket/Demo2.pro b/supermarket/Demo2.pro index e73d1fd..ad2981e 100644 --- a/supermarket/Demo2.pro +++ b/supermarket/Demo2.pro @@ -5,47 +5,66 @@ #------------------------------------------------- QT += core gui +# 指定项目需要使用的Qt模块,这里添加了core(核心模块)和gui(图形用户界面模块)。 + QT += network +# 添加了network模块,用于网络功能。 CONFIG += c++11 +# 配置项目以使用C++11标准。 + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +# 如果Qt版本大于4,则添加widgets模块,这是为了兼容旧版本的Qt。 TARGET = Demo2 +# 指定项目的输出目标(可执行文件)名称为Demo2。 + TEMPLATE = app +# 指定项目的模板类型为应用程序(app)。 # The following define makes your compiler emit warnings if you use # any feature of Qt which as 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 +# 如果使用被标记为弃用(deprecated)的Qt特性,则编译器会发出警告。 # 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 - +# 如果使用了在Qt 6.0.0之前被弃用的API,则代码将无法编译。这行被注释掉了,需要时可以取消注释。 SOURCES += main.cpp\ quiwidget.cpp \ supermarket.cpp +# 指定项目的源文件,这里是main.cpp和其他两个.cpp文件。 HEADERS += \ quiwidget.h \ head.h \ supermarket.h +# 指定项目的头文件。 FORMS += \ supermarket.ui +# 指定项目的UI文件,这里是使用Qt Designer设计的界面文件。 RESOURCES += \ main.qrc \ qss.qrc \ demo.qrc \ image.qrc +# 指定项目的资源文件,这些文件包含了图标、样式表等资源。 DISTFILES += \ Demo2.pro.user \ main.ico \ image/Font Awesome Cheatsheet.png - QT += network +# 指定项目分发时需要包含的额外文件。 + +QT += network +# 再次添加network模块,可能是为了强调或重复添加。 + RC_FILE=icon.rc +# 指定Windows资源文件,通常用于版本信息和图标等。 \ No newline at end of file